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/env ruby | |
path = File.expand_path('~/Downloads/'); | |
older_path = File.join(path, 'Older') | |
days = 20 | |
seconds_offset = ( days*24*60*60) | |
the_break = Time.now - seconds_offset | |
Dir.foreach(path) do |fname| |
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
for (( ; ; )) | |
do | |
yes '-' | head -n$(($LINES * $COLUMNS)) | tr -d '\n' | |
sleep .3 | |
yes '/' | head -n$(($LINES * $COLUMNS)) | tr -d '\n' | |
sleep .3 | |
yes '|' | head -n$(($LINES * $COLUMNS)) | tr -d '\n' | |
sleep .3 | |
yes '\' | head -n$(($LINES * $COLUMNS)) | tr -d '\n' | |
sleep .3 |
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
# local color_array=(cyan white yellow magenta black blue red default grey green) | |
# hostname | md5 -qr | cut -c1 | |
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi | |
local return_code="%(?..%{$fg[red]%}%?↵%{$reset_color%})" | |
local time_code="%{%(?.$reset_color.$fg[red])%}%*%{$reset_color%}" | |
PROMPT='%{%(?.$fg[$NCOLOR].$fg[red])%}%n%{$fg[green]%}@%m%{$reset_color%} %(?..%{$fg[red]%})%~ \ | |
$(git_prompt_info)\ | |
%{$fg[red]%}%(!.#.»)%{$reset_color%} ' |
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
package main | |
import ( | |
"fmt" | |
"strconv" | |
"strings" | |
) | |
var input = `bn RSHIFT 2 -> bo | |
lf RSHIFT 1 -> ly |
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/env php | |
<?php | |
$file = @$argv[1]; | |
if( !is_file($file) ) { | |
die('Please provide a SQL file' . PHP_EOL); | |
} | |
$file_size = filesize($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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by gearmand configure 1.1.7, which was | |
generated by GNU Autoconf 2.69. Invocation command line was | |
$ ./configure --prefix=/usr/local/Cellar/gearman/1.1.7 --with-mysql | |
## --------- ## | |
## Platform. ## |
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 | |
date_default_timezone_set('America/Chicago'); | |
$subject = file_get_contents("http://penny-arcade.com/dlc"); | |
preg_match_all('%<li[ >].*?<h4>(?P<title>.*?)</h4>.*?class="paDLCLink"[^>]href="(?P<file>.*?)".*?</li%si', $subject, $result, PREG_SET_ORDER); | |
header('Content-Type: application/rss+xml'); | |
echo '<?xml version="1.0" encoding="UTF-8"?>'; |
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/sh | |
# Requires a POSIX-ish shell. | |
# | |
# Originally From: http://hayne.net/MacDev/Bash/show_getinfo | |
# | |
# show_getinfo | |
# This script opens the Finder's "Get Info" window | |
# for the file or folder specified as a command-line argument. |
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/env php | |
<?php | |
$cwd = getcwd(); | |
$dirs = explode(DIRECTORY_SEPARATOR, $cwd); | |
$opened = [ ]; | |
for( $i = count($dirs); $i >= 1; $i-- ) { | |
$set = array_slice($dirs, 0, $i); | |
$path = implode(DIRECTORY_SEPARATOR, $set); |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"regexp" | |
"sort" | |
"strconv" | |
"strings" |