As configured in my dotfiles.
start new:
tmux
start new with session name:
''' | |
redis_simple_chat.py | |
Written June 24, 2011 by Josiah Carlson | |
Released under the GNU GPL v2 | |
available: http://www.gnu.org/licenses/gpl-2.0.html | |
Other licenses may be available upon request. |
set :sync_directories, ["public/system/images"] | |
set :sync_backups, 3 | |
set :db_file, "mongoid.yml" | |
set :db_drop, '--drop' # drop database (rewrites everything) |
namespace :image_compression do | |
desc 'Optimize images with pngcrush and jpegoptim' | |
task :process do | |
# Check for pngcrush | |
if (!`which pngcrush`.empty? rescue false) # rescue on environments without `which` (windows) | |
# Crush all .png files | |
run "find #{shared_path}/assets/ -type f -name '*.png' -print0 | xargs -0 pngcrush -q -e .crushed" |
As configured in my dotfiles.
start new:
tmux
start new with session name:
const net = require("net"); | |
var server = net.createServer(function (c) { | |
var oldWrite = c.write; | |
c.write = function(d) { | |
if (!Buffer.isBuffer(d)) { | |
d = new Buffer(d); | |
} | |
oldWrite.call(this, d); | |
server.bytesSent += d.length; |
FROM ubuntu | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade | |
RUN apt-get install -y openssh-server supervisor | |
ADD sshd.conf /etc/supervisor/conf.d/sshd.conf | |
RUN mkdir -p /var/run/sshd |
I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.
I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...
# Node-WebKit CheatSheet | |
# Download: https://github.com/rogerwang/node-webkit#downloads | |
# Old Versions: https://github.com/rogerwang/node-webkit/wiki/Downloads-of-old-versions | |
# Wiki: https://github.com/rogerwang/node-webkit/wiki | |
# How: https://github.com/rogerwang/node-webkit/wiki/How-node.js-is-integrated-with-chromium | |
# 1. Run your application. | |
# https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps |
option_settings: | |
- option_name: AWS_SECRET_KEY | |
value: ------------------------------------------- | |
- option_name: AWS_ACCESS_KEY_ID | |
value: ------------------------------ | |
- option_name: PORT | |
value: 8081 |
#experimental program one to send notes to | |
#SP running on a second computer, using OSC sync | |
use_osc "localhost", 8000 | |
sleep 1 #allow OSC time to setup | |
use_synth :piano | |
with_fx :reverb,room: 0.6 do | |
a1=[] | |
b1=[] | |
a1[0]=[:r,:C4,:D4,:E4,:F4,:D4,:E4,:C4,:G4,:C5,:B4,:A4,:B4,:C5,:D5,:G4,:A4,:B4,:C5,:A4,:B4,:G4,:D5,:G5,:F5,:E5,:F5,:G5,:E5,:A5,:G5,:F5,:E5,:G5,:F5,:A5,:G5,:F5,:E5,:D5,:C5,:E5,:D5,:F5,:E5,:D5,:C5,:B4,:A4,:C5,:B4,:D5,:C5,:B4,:A4,:G4,:Fs4,:A4,:G4,:B4,:A4,:D4,:C5,:B4,:C5,:D5,:B4,:A4,:G4,:Fs4,:E4,:G4,:Fs4,:A4,:G4,:B4,:A4,:C5,:B4,:D5,:C5,:E5,:D5,:B4,:C5,:D5,:G5,:B4,:C5,:B4,:A4,:G4,:G4,:r,:r,:G4,:A4,:B4,:C5,:A4,:B4,:G4,:Fs4,:G4,:Fs4,:r,:r,:A4,:B4,:C5,:D5,:B4,:C5,:A4,:B4,:r,:r,:D5,:C5,:B4,:A4,:C5,:B4,:D5,:C5,:r,:r,:E5,:D5,:C5,:B4,:D5,:Cs5,:E5,:D5,:Cs5,:D5,:E5,:F5,:A4,:B4,:Cs5,:D5,:Fs4,:Gs4,:A4,:B4,:C5,:D5,:E4,:Fs4,:Gs4,:A4,:Fs4,:Gs4,:E4,:E5,:D5,:C5,:E5,:D5,:C5,:B4,:D5,:C5,:A5,:Gs5,:B5,:A5,:E5,:F5,:D5,:Gs4,:F5,:E5,:D5,:C5,:D5,:C5,:B4,:A4,:A4,:A5,:G5,:F5,:E5,:G5,:F5,:A5,:G5,:G5,:E5,:F5,:G5,:A5,:F5,:G5,:E5,:F |