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
# PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m%{$fg[yellow]%}%~%{$reset_color%}%%" | |
local blue_op="%{$fg[blue]%}[%{$reset_color%}" | |
local blue_cp="%{$fg[blue]%}]%{$reset_color%}" | |
local path_p="${blue_op}%~${blue_cp}" | |
local user_host="${blue_op}%n@%m${blue_cp}" | |
local ret_status="${blue_op}%?${blue_cp}" | |
local hist_no="${blue_op}%h${blue_cp}" | |
local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color%})" | |
PROMPT="╭─${path_p}─${user_host} |
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 | |
/** | |
* monitor_changes_dir.php is a simple Command Line Script | |
* which monitor changes of a directory and calls a `on_file_change' function. | |
* Make sure it is executable. | |
* | |
* `on_file_change' calls sftp_upload, | |
* |
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
<script> | |
function asciimap_decode (s) { | |
var out = ''; | |
var _r = []; | |
var count, ascii = 0; | |
var blocks = s.split('|'); | |
// console.log(blocks); | |
for (var block in blocks) { | |
// console.log(blocks[block]); | |
_r = blocks[block].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
<?php | |
function ascii_lexan($s) | |
{ | |
$tokens = array(); | |
$strlen = strlen($s); | |
for ($i = 0;$i < $strlen; $i++) { | |
$tokens []= ord($s[$i]); | |
} | |
return $tokens; |
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 | |
function asciimap_read($s) | |
{ | |
$out = ''; | |
$instructions = explode('|', $s); | |
foreach ($instructions as $instruction) { | |
$_ = explode(':', $instruction); | |
$count = $_[0]; | |
$ascii = $_[1]; |
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
# PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m%{$fg[yellow]%}%~%{$reset_color%}%%" | |
local blue_op="%{$fg[blue]%}[%{$reset_color%}" | |
local blue_cp="%{$fg[blue]%}]%{$reset_color%}" | |
local path_p="${blue_op}%~${blue_cp}" | |
local user_host="${blue_op}%n@%m${blue_cp}" | |
local ret_status="${blue_op}%?${blue_cp}" | |
local hist_no="${blue_op}%h${blue_cp}" | |
local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color%})" | |
PROMPT="╭─${path_p}─${user_host} |
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
# duh - disk usage humanreadable, source 'inataysia' reddit | |
alias duh='du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; 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
var gamejs = require('gamejs'); | |
var mixer = require('gamejs/mixer'); | |
var stepsequencer = require('stepsequencer'); | |
var FPS = 60; | |
var BPM = 100; | |
var extAudio = ".ogg"; | |
// var extAudio = ".wav"; |
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
syntax on | |
filetype plugin indent on | |
set paste | |
set ruler | |
set expandtab "Convert tabs to spaces - Expand Tab" | |
set tabstop=4 "Length of tab" | |
"Optional: " |
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
# get all pdf files of website | |
# Syntax: wget --recursive --accept .pdf <URL> | |
# | |
$ wget -r -A.pdf http://www.example.com/folder/ | |
# | |
# with level of recursion | |
$ wget --recursive --accept .pdf --level=3 --no-host-directories --no-parent http://www.example.com/ | |
OlderNewer