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 parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local YELLOW="\[\033[0;33m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" |
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 | |
# | |
# Display usage info | |
vhost-usage() { | |
cat <<"USAGE" | |
Usage: vhost [OPTIONS] <name> | |
-h|--help this screen | |
-pub to create the webhost root in ~/www/name/public/ | |
-url to specify a local address, default is http://name.local |
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
<VirtualHost *:80> | |
ServerAdmin template.email | |
ServerName template.url | |
DocumentRoot template.webroot | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> |
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
# Put the following into ~/.ssh/ and just shoose shell connect and set your host 'ec2.xxx.compute.amazonaws.com': | |
Host ec2.xxx.compute.amazonaws.com | |
User ec2-user | |
IdentityFile /path/to/the/my.pem |
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
/* | |
Инструкция по использованию: | |
- заходим в раздел с аудиозаписями | |
- листаем в самый низ (чтобы прогрузились все аудиозаписи) | |
- открываем консоль браузера (F12 -> Консоль) | |
- вставляем код и нажимаем ENTER | |
- скачивание началось... | |
- браузер может потребовать разрешение на сохранение файлов, необходимо подтвердить действие | |
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
app.filter('bytes', function() { | |
return function(bytes, precision) { | |
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
if (typeof precision === 'undefined') precision = 1; | |
var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], | |
number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
} | |
}); |
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
live_loop :foo do | |
with_fx :echo, mix: 0.3 do | |
sample :elec_tick if spread(2,7).tick | |
pattern1 = (knit :a3, 1, :d3, 1, :g3, 1) | |
pattern2 = (knit :a3, 1, :d3, 1, :g3, 1, :a0, 1) | |
pattern3 = (knit :a3, 1, :d3, 1, :g3, 1, :a5, 1) | |
structure = (knit pattern1, 128, pattern2, 32, pattern3, 32).tick(:structure) |
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
# Ambient experiment for Sonic Pi (http://sonic-pi.net/) | |
# | |
# The piece consists of three long loops, each of which plays one of | |
# two randomly selected pitches. Each note has different attack, | |
# release and sleep values, so that they move in and out of phase | |
# with each other. This can play for quite awhile without | |
# repeating itself :) | |
live_loop :note1 do | |
use_synth :hollow |
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
samps = "C:/Program Files (x86)/Sonic Pi/etc/my-samples" | |
use_bpm 170 | |
live_loop :metro do | |
sleep 1 | |
cue :beat | |
sleep 7 | |
cue :ambient | |
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
# floating-moment.rb | |
# ambient soundscape for relaxing and meditation | |
# Created by Sven Wachsmuth | |
# https://gist.github.com/sven-wachsmuth/0cc06cc0d698d8932ceb142dcf5231ba | |
use_bpm 60 | |
laenge_in_takten = 229 # length of the track in beats - 300 means relax 5 minutes :-) | |
# possible notes out of a sounds-well-scale |
OlderNewer