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
ls | nl -nrz -w2 | while read a b; do mv "$b" filename.$a.png; 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
#!/bin/bash | |
#copyright: 2009 | |
#author: gabriel dunne | |
#url: quilime.com | |
IMAGE=$1 | |
IMAGE_W=$2 | |
IMAGE_H=$3 | |
ROWS=$4 | |
COLS=$5 |
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
PS1="[\d \t \u@\h:\w ] $ " |
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
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ | |
RewriteRule . %1/%2 [R=301,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
# Pass existing files, symlinks, directories through like normal | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] | |
# Pass everything else to the application | |
RewriteRule ^.*$ application.php [NC,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
<?php | |
/* | |
A simple multidimensional key-value sorting function, allowing you to sort an | |
array by a multidimensional key without having to write callback functions. | |
This concept appears to be missing in PHP, this function allows for easy array | |
sorting. Works with both strings and numbers, case sensitive and doesn't | |
drop/mash keys. PHP 5.3.0 > only. | |
via: http://projects.westhost.com/contest/php/function/simple-multi-dimensional-key-sort/151 |
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/python | |
import random | |
rows = 20 | |
cols = 80 | |
num_stars = 100 | |
rand_stars = [] | |
while (len(rand_stars) < num_stars): |
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 nltk | |
import string | |
from urllib import urlopen | |
from itertools import imap | |
url = "http://google.com" | |
html = urlopen(url).read() | |
text = nltk.clean_html(html) | |
text_noPunc = text.translate(string.maketrans("",""), string.punctuation) | |
words = text_noPunc.split() |
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
// via "Einstienstien" - by Dave Hoskins, on Shadertoy | |
// http://glsl.heroku.com/e#10662.0 | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 resolution; | |
float col = 0.0; // Start black. |
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> | |
<meta charset="utf-8"> | |
Hello, world!!! |
OlderNewer