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
cd /home/harry/Downloads/complete | |
mv \[180*\]-\[FULL\]-\[*.teevee\@EFNet\]-\[\ How.I.Met.Your.Mother*/*.avi /home/harry/Videos/How_I_Met_Your_Mother/ | |
cd /home/harry/Videos/How_I_Met_Your_Mother | |
for file in *ow.*.*et.*our.*other* ; do mv $file `echo $file | cut -d. -f6`'.avi' ; done | |
for f in `find`; do mv -v $f `echo $f | tr '[A-Z]' '[a-z]'`; done |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<style type="text/css"> | |
.image_box { | |
color: #696969; | |
} | |
.image_box .left { | |
text-align: left; |
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 | |
cd | |
yum install -y git httpd bash curl libxslt gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 libcurl-devel apr-devel httpd-devel | |
rm -rf /var/www/* | |
rm -f /etc/httpd/conf.d/welcome.conf | |
rm -f /etc/httpd/conf/httpd.conf | |
touch /etc/httpd/conf/httpd.conf | |
curl https://raw.github.com/gist/1130403 >> /etc/httpd/conf/httpd.conf | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
/usr/local/rvm/bin/rvm install 1.9.2 |
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
#!/usr/bin/ruby | |
require 'humanize' | |
require 'open-uri' | |
(2..99).each do |number| | |
filename = "map_marker_#{number.humanize.gsub('-', '_')}.png" | |
url = URI.parse URI.encode("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=#{number}|FF776B") | |
open(filename, 'wb') do |file| | |
file << open(url).read | |
end |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var mandelbrotCanvas = document.getElementById('mandelbrotCanvas'); | |
var context = mandelbrotCanvas.getContext('2d'); | |
var width = mandelbrotCanvas.width; | |
var height = mandelbrotCanvas.height; |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var mandelbrotCanvas = document.getElementById('mandelbrotCanvas'); | |
var context = mandelbrotCanvas.getContext('2d'); | |
var width = mandelbrotCanvas.width; | |
var height = mandelbrotCanvas.height; |
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
require 'rubygems' | |
require 'open-uri' | |
require 'pp' | |
require 'mechanize' | |
require 'mongo' | |
require 'progressbar' | |
require 'pry' | |
MONGO = Mongo::Connection.new.db('bcb7') |
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
// Mostly copied from http://bost.ocks.org/mike/nations/ | |
// Various accessors that specify the four dimensions of data to visualize. | |
function x(d) { return d.x; } | |
function y(d) { return d.y; } | |
function radius(d) { return d.radius; } | |
function color(d) { return d.color; } | |
function key(d) { return d.name; } | |
// Chart dimensions. |
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
#!/usr/bin/pypy | |
# Change the above #! if you want to use python (slower) rather than pypy | |
import random, re, sys, math | |
from segment import segment | |
# Usage: ./crack.py ciphertext | |
# where ciphertext is (you guessed it) a plaintext file containing the | |
# ciphertext |
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
filter = Stopwords::Snowball::Filter.new "en" | |
unique_words = filter.filter(unique_words).uniq |
OlderNewer