This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set a to item 1 of getFrontApp() | |
if a contains "Finder" then | |
tell application "Finder" | |
set the_folder to (folder of the front window) as text | |
set the_folder to POSIX path of the_folder | |
set the_folder to (do shell script "echo " & the_folder & " | sed 's/ /\\\\ /g'") | |
end tell | |
tell application "Terminal" | |
do script "cd " & the_folder & ";clear;pwd" | |
activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set applist to getFrontApp() | |
-- screen resolution | |
set screen to {1280, 800} | |
set menubar to getMenuSize() | |
set dock to getDockSize() | |
set a to item 1 of getFrontApp() | |
set t to (item 2 of menubar) | |
set l to 0 | |
set h to 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python script to find missing lines from two different files | |
import sys | |
import string | |
if len(sys.argv) < 4: | |
print "Usage: findmissing.py <master-file> <test-file> <result-file>" | |
sys.exit() | |
else: | |
file1 = sys.argv[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ window.open('https://mail.google.com/tasks/canvas','myWindow', 'status=1, height=600,width=600,resizable = 0,location=0'); })(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import paramiko | |
import string | |
import webbrowser | |
import os | |
ssh = paramiko.SSHClient() | |
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
ssh.connect('192.168.1.21', username='username', password='password') | |
print "1: get file \n2: print contents of file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo aptitude update && sudo aptitude install gnome-do |
NewerOlder