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
# Run this in terminal to generate a key on your local machine | |
ssh-keygen -t rsa | |
# Next, SSH into your site and and copy the contents of the local file ~/.ssh/mykey.pub to the remote file ~/.ssh/authorized_keys | |
# I use vi for this, and you can have multiple keys in one 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
# search redirect | |
# this will take anything in the query string, minus any extraneous values, and turn them into a clean working url | |
RewriteCond %{QUERY_STRING} \\?s=([^&]+) [NC] | |
RewriteRule ^$ /search/%1/? [NC,R,L] |
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
CREATE TABLE `mailinglist` ( `id` INT NOT NULL AUTO_INCREMENT , `email` TEXT NOT NULL, `user` TEXT NOT NULL , PRIMARY KEY ( `id` ) ) |
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 inspect | |
def func(a, b, c): | |
frame = inspect.currentframe() | |
args, _, _, values = inspect.getargvalues(frame) | |
print 'function name "%s"' % inspect.getframeinfo(frame)[2] | |
for i in args: | |
print " %s = %s" % (i, values[i]) | |
return [(i, values[i]) for i in args] |
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
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); | |
var array = [] | |
$(".title > a").each(function() { | |
array.push($(this).text()); | |
}); |
NewerOlder