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
function lines_as_progress { | |
echo -ne "█ ("$@") " | |
stdbuf --output=L --error=L "$@" 2>&1 | | |
while IFS= read -r line | |
do | |
printf "." | |
done | |
printf " Done" | |
echo | |
} |
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 | |
// This script ONLY RETURNS BASH COMMANDS that would take care of the renaming. | |
// Usage: | |
// alembic_filename_date.php --glob=<glob_pattern:*.py> --format=<date_format:Y-m-d_H-i_> | |
$optGlob = '*.py'; | |
$optFormat = 'Y-m-d_H-i_'; |
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
# Echo number of GIT commits per year. | |
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$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
// Prepare some stuff. | |
var bpm = 135; | |
var loopInterval = (60 * 1000) / bpm / 4; | |
// Master channel. | |
__().compressor({id: "master"}).dac(); | |
__().sine({id: "kick", frequency: 60}) | |
.overdrive({drive: 0.05}) | |
.adsr({id: "kickA"}) |
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
// Sine | |
__().sine({id:"kurva"}).lowpass(220).reverb({ | |
seconds: 3, | |
decay: 2, | |
}).dac(0.5); | |
// Loop | |
__.loop({steps:8,interval: 400}); | |
var k =__("#kurva"); |
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 very basic crude Form class. | |
* It can have input controls + will know their values. | |
* Also will know if it (the form) was itself submitted. | |
*/ | |
class CrudeForm { | |
/** @var string Form name for identifying the form. **/ |
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 5.6 keywords and stuff (as of 21.01.2015) | |
--- | |
PHP Keywords: | |
(http://php.net/manual/en/reserved.keywords.php) | |
__halt_compiler() | |
abstract | |
and | |
array() |
NewerOlder