View .gistup
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
gistup |
View gist:9bf1b0002549650be3e7
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Play>sound_file://953</Play> | |
<Play>https://s3.amazonaws.com/callflow/Venus-Isle.mp3</Play> | |
</Response> |
View zmg
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Play>sound_file://953</Play> | |
<Play>https://s3.amazonaws.com/callflow/Venus-Isle.mp3</Play> | |
</Response> |
View gist:251581
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
should be placed in ~/.zsh/functions/service : | |
#compdef service | |
if [ -z $1 ]; then | |
echo "Usage: service <service_name>" | |
else | |
/usr/local/etc/rc.d/$1 $2 | |
fi | |
should be placed in ~/.zsh/functions/_service : | |
#compdef service |
View gource-multiple-repositories.sh
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 bash | |
# Generates gource video (h.264) out of multiple repositories. | |
# Pass the repositories in command line arguments. | |
# Example: | |
# <this.sh> /path/to/repo1 /path/to/repo2 | |
RESOLUTION="1600x1080" | |
outfile="gource.mp4" | |
i=0 |
View example.c
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <time.h> | |
#include "hiredis.h" | |
#include "async.h" | |
#include "adapters/ae.h" | |
#include "sha1.h" |
View pkg-finder
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 | |
RESULT=$(find $@ -type f -perm /a+x -exec ldd {} \; \ | |
| grep so \ | |
| sed -e '/^[^\t]/ d' \ | |
| sed -e 's/\t//' \ | |
| sed -e 's/.*=..//' \ | |
| sed -e 's/ (0.*)//' \ | |
| sort \ | |
| uniq \ |
View gsutil-upload.sh
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
# Rsync to remove old files | |
gsutil -m rsync -x '.git*' -c -d -r dist gs://bucket/ | |
# Upload and gzip HTML, CSS and JavaScript | |
gsutil -m cp -z "html,css,js" -r dist/** gs://bucket/ | |
# Set expires headers (6 months) on JS and CSS assets | |
gsutil -m setmeta -h "Cache-Control: public, max-age=15552000" gs://bucket/assets/** | |
# Make sure there's no expiration headers on HTML files |
View key-binding.json
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
[ | |
{ "keys": ["ctrl+shift+."], "command": "erb" }, | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" }, | |
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} } | |
] |
View thread-pool.rb
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
require 'concurrent' | |
pool = Concurrent::FixedThreadPool.new(8, idletime: nil) | |
100.times do |i| | |
pool.post do | |
rnd = SecureRandom.random_number(5) | |
puts "task #{i}: sleep #{rnd}" | |
sleep rnd | |
end |