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
# Virtual Hosts | |
NameVirtualHost *:80 | |
<Directory "/Users/seeread/Sites/"> | |
Options Indexes MultiViews +FollowSymLinks Includes | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> |
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
# gem install pp awesome_print map_by_method what_methods duration wirble ori awesome_print | |
# Interactive Ruby console configuration | |
# use x = _ to assign to last output | |
# use ; to prevent return of data | |
# use 'method' to determine where a method is defined | |
# e.g. User.method(:acts_as_commentable) | |
IRB_START_TIME = Time.now | |
# Print to yaml format with "y" |
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
//css for arrows | |
button { | |
-webkit-appearance: none; | |
background: transparent; | |
border: 0; | |
outline:0; | |
} | |
svg { | |
padding: 5px; |
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 re | |
import pprint | |
import urlparse | |
import urllib2 | |
#http://blog.ianbicking.org/2008/12/10/lxml-an-underappreciated-web-scraping-library/ | |
from lxml.html import parse, tostring, fromstring #for better css selectors than Beautiful Soup | |
from lxml.html.diff import htmldiff | |
from lxml import cssselect, etree | |
from urlparse import urlparse | |
from pytz import timezone |
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
//jump from github page to github repo quickly (some peeps don't link) | |
javascript:{var a=location.href.split('/'), b = a[2].split('.'); a = a.slice(-2)[0];b= b[0];a="http://github.com/"+b+"/"+a;location.href=a;} |
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
// useful bookmarklet for side-by-side viewing of original and translated content (tested in chrome and firefox?) | |
// adapted from http://www.chromeplugins.org/plugins/google-chrome-dual-view/ | |
// use as you like | |
// http://seeread.info | |
javascript:a=location.href;b='http://translate.google.de/translate?u='+a+'&hl=en&langpair=auto|en&tbb=1';f='<frameset cols=\'*,*\'>\n<frame src=\''+a+'\'/>';f+='<frame src=\''+b+'\'/>\n';f+='</frameset>';with(document){write(f);void(close())}; |
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
#/bin/bash | |
# run chmod +x THIS_GIST.sh | |
# configure for debian or ubuntu! debian has dependencies that ubuntu's libs will conflict with | |
# sources: | |
# http://cran.r-project.org/bin/linux/debian/ | |
# http://cran.r-project.org/bin/linux/ubuntu/README | |
# http://stackoverflow.com/questions/10255082/installing-r-from-cran-ubuntu-repository-no-public-key-error | |
clear |
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
# http://stackoverflow.com/questions/1189759/expert-r-users-whats-in-your-rprofile | |
#set cran repo | |
r <- getOption("repos") # hard code the US repo for CRAN | |
r["CRAN"] <- "http://cran.us.r-project.org" | |
options(repos = r) | |
rm(r) | |
#persistent RHistory | |
.Last <- function() { | |
if (!any(commandArgs()=='--no-readline') && interactive()){ |
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
# nvidia-settings: X configuration file generated by nvidia-settings | |
# nvidia-settings: version 302.17 (buildd@rhenium) Sun Jun 17 23:26:33 UTC 2012 | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" | |
Option "Xinerama" "0" | |
EndSection |
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
#!/bin/bash | |
# boot_enhancer.sh | |
# also see Bootchart http://www.bootchart.org/ | |
# source http://www.ubuntubuzz.com/2012/01/how-to-increasespeed-up-ubuntu-booting.html | |
first_half() | |
{ | |
sudo apt-get -y install prelink # http://ubuntuforums.org/showthread.php?t=832615 | |
sudo /etc/cron.daily/prelink | |
sudo apt-get -y install preload # http://ubuntuforums.org/showthread.php?t=832615 | |
sudo sed -i 's/PRELINKING\=unknown/PRELINKING\=yes/g' /etc/default/prelink |
NewerOlder