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
# 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
<?php | |
$CLUT = array( | |
'00' => array( 0, 0, 0 ), '01' => array( 128, 0, 0 ), | |
'02' => array( 0, 128, 0 ), '03' => array( 128, 128, 0 ), | |
'04' => array( 0, 0, 128 ), '05' => array( 128, 0, 128 ), | |
'06' => array( 0, 128, 128 ), '07' => array( 192, 192, 192 ), | |
'08' => array( 128, 128, 128 ), '09' => array( 255, 0, 0 ), | |
'10' => array( 0, 255, 0 ), '11' => array( 255, 255, 0 ), | |
'12' => array( 0, 0, 255 ), '13' => array( 255, 0, 255 ), |
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
#!/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
#!/usr/bin/env php | |
<?php | |
print_r($argv); |
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
class Dir | |
class << self | |
def exists? (path) | |
File.directory?(path) | |
end | |
alias_method :exist?, :exists? | |
end | |
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
javascript:location.href='googlechrome://'+location.host+location.pathname; |
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
*[class]:before { | |
position: absolute; | |
background: rgba(10,10,10,.6); | |
padding: 10px; | |
border-radius: 4px; | |
color: white; | |
font-size: 10px; | |
display: block; | |
content: "[" attr(class) "] " ; | |
} |
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
DECLARE SUB where (d#, pants#) | |
DECLARE SUB look (d#) | |
DECLARE SUB lookat (d#) | |
DIM level#(4, 4) | |
CLS | |
FOR c# = 1 TO 4 | |
FOR b# = 1 TO 4 | |
level#(b#, c#) = a# | |
a# = a# + 1 | |
NEXT |