Cybersweden

How to: Force a reboot on a Mac Server – remotely via ssh

by on Jun.26, 2012, under How to

ssh username@ip-address
sudo /sbin/shutdown -r now

VN:F [1.9.22_1171]
Rating: 5.0/5 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

How to: Adjust the password session time for a protected page in WordPress

by on Jan.22, 2012, under How to

In the wp-pass.php file we look for the following line of code:

setcookie(‘wp-postpass_’ . COOKIEHASH, stripslashes( $_POST[‘post_password’] ), time() + 864000, COOKIEPATH);

The 86400 is the number of seconds that the password session will be alive.

If you only want the cookie to be active for let’s say 30 minutes, just simply change 864000 to 1800.

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
3 Comments more...

How to: Create a YouTube playlist with iMacro and Firefox

by on Jan.22, 2012, under How to

Assume that we use:

  • Win OS
  • Firefox 9.0.1
  • iMacros for Firefox 7.4.0.8

and we want to batch-fill a playlist in YouTube with links to various videos.

1. We must first create a variables.txt file where we enter a single column of variables. Make sure that the file has Unicode coding. Lets say that this file now contains 11 links that should be added to a playlist on YouTube. Each link should have its own individual line in the variables.txt file.

http://www.youtube.com/watch?v=BcMvw
http://www.youtube.com/watch?v=wegdE
http://www.youtube.com/watch?v=ggirRq
http://www.youtube.com/watch?v=Nuiegs

2. Change the .txt extension to .csv (afterwards though, continue to edit the file in Notepad)
3. Put the file in C:\Documents and Settings\USERNAME\My Documents\iMacros\Datasources\
4. Log into YouTube and place the marker at the “Add Video by URL”
5. Compile and execute in iMacro through the Play (Loop) button.

SET !DATASOURCE variables.csv
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=2 TYPE=INPUT:TEXT FORM=ACTION:/playlist_edit ATTR=* CONTENT={{!COL1}}
TAG POS=1 TYPE=BUTTON ATTR=ROLE:button&&ONCLICK:;returnfalse;&&CLASS:playlist-add-video-url-button-addyt-uix-button&&TYPE:button&&TXT:Add
WAIT SECONDS=1

6. It does not hurt to loop the same amount of time as the number of rows in your .csv file. Toggle this by opening the variables.csv in excel to count rows, but edit in Notepad.

VN:F [1.9.22_1171]
Rating: 4.9/5 (7 votes cast)
VN:F [1.9.22_1171]
Rating: +6 (from 6 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

How to: Clear Spotify cache under Mac OS from Terminal

by on Jan.20, 2012, under How to

This is a non-reversible command so plz use it at your own risk!
Open Terminal and execute:

sudo rm -fr /Users/USERNAME/Library/Caches/com.spotify.client/Storage/*

VN:F [1.9.22_1171]
Rating: 4.2/5 (5 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 5 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

How to: Link to a YouTube clip with the highest resolution

by on Jan.18, 2012, under How to

Just add

&hd=1

to the end of the link.

For instance, if you desire to share:
http://www.youtube.com/watch?v=7XZGJiY2a3o

but want to enforce highest possible resolution in the link – just adjust the link so it looks like:
http://www.youtube.com/watch?v=7XZGJiY2a3o&hd=1

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

How to: Kill/close a program/application via telnet

by on Jan.17, 2012, under How to

taskkill /f /im vlc.exe

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

EU net balance 2007 – 2013

by on Nov.22, 2011, under Misc

During 2011 many Europeans started to wonder if their taxes are patching up deficits in other EU countries. I often found myself in dispute with friends, colleagues and even family members arguing about whether a particular EU member state is a net recipient or contributor of EU funds. This document came frequently to our aid.

Source: Open Europe briefing note: European Communities (Finance) Bill

VN:F [1.9.22_1171]
Rating: 5.0/5 (6 votes cast)
VN:F [1.9.22_1171]
Rating: +5 (from 5 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

Different Jobs

by on Nov.13, 2011, under Sociopol, Thought

The following summarization of the year 2011 has gained huge popularity on the Internet. Two very important historical events followed by the outmost disregard and contempt towards a well-known Italian politician. The term “jobs” links all three of them.

 

 

 

 

 

 

 

 

 

 

 

 

VN:F [1.9.22_1171]
Rating: 5.0/5 (5 votes cast)
VN:F [1.9.22_1171]
Rating: +4 (from 4 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

Success

by on Nov.13, 2011, under Misc, Sociopol, Thought

Some might disagree with this statement and I won’t quarrel neither on the definition on success nor on how it really looks like getting there. I will summarize my own personal view with the words of Moliere: “The greater the obstacle, the more glory in overcoming it.”

 

 

VN:F [1.9.22_1171]
Rating: 5.0/5 (6 votes cast)
VN:F [1.9.22_1171]
Rating: +6 (from 6 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

How to: Batch create multiple folders on Mac OS X 10.7 Lion

by on Nov.04, 2011, under How to

Use applescript, compile and run:

set theDestinationFolder to choose folder
set theListOfValues to {“Nome of folder 1”, “Name of folder 2”, “Name of folder 3”}
tell application “Finder”
repeat with theCurrentValue in theListOfValues
make new folder at theDestinationFolder with properties {name:theCurrentValue}
end repeat
end tell

You can also use a .csv file:

set mgCSVfile to choose file

open for access mgCSVfile
set mgList to (read mgCSVfile)
close access mgCSVfile

tell application “Finder”
repeat with x from 1 to count paragraphs of mgList
set mgFolder to container of mgCSVfile as text
set text item delimiters of AppleScript to “,”
set mgThisList to text items of paragraph x of mgList as list
set text item delimiters of AppleScript to “”

repeat with i from 1 to count mgThisList
if item i of mgThisList is not “” then
set mgSubFolder to item i of mgThisList
if (exists folder mgSubFolder of folder mgFolder) is false then
make new folder at mgFolder with properties {name:mgSubFolder}
end if
set mgFolder to (folder mgSubFolder of folder mgFolder) as alias
end if
end repeat

end repeat
end tell

VN:F [1.9.22_1171]
Rating: 5.0/5 (6 votes cast)
VN:F [1.9.22_1171]
Rating: +5 (from 5 votes)
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS
Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!