start new:
tmux
start new with session name:
tmux new -s myname
require 'bundler/capistrano' | |
set :application, "net" | |
set :repository, "git@githost.com:net.git" | |
set :scm, :git | |
set :default_environment, { | |
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" | |
} |
using System; | |
namespace RsaKeyConverter.Converter | |
{ | |
public static class BytesExtensions | |
{ | |
public static string ToBase64(this byte[] bytes) | |
{ | |
return Convert.ToBase64String(bytes); | |
} |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
//function types | |
type mapf func(interface{}) interface{} |
To open SQLite Things.app database run this command in Terminal.app:
$ sqlite3 ~/Library/Containers/com.culturedcode.things/Data/Library/Application\ Support/Cultured\ Code/Things/ThingsLibrary.db
In SQLite command-line type this query to get your tasks stats:
sqlite> .mode column
sqlite> .header on
sqlite> select zscheduler, zstatus, ztrashed, count(*) from ZTHING where z_ent = 13 group by zstatus,ztrashed order by Z_pk desc;
ZSCHEDULER ZSTATUS ZTRASHED count(*)
# .railsrc | |
-B #Skip Bundle | |
-T #Skip Test-Unit | |
-d postgresql #Use postgres |
hash = { 'foo' => 'bar' } | |
# Version 1 | |
hash = Hash[hash.map { |k, v| [k.to_sym, v] }] | |
# Version 2 | |
hash = hash.reduce({}) do |memo, (k, v)| | |
memo.tap { |m| m[k.to_sym] = v } | |
end |
#Add gem into Gemfile and do bundle install | |
gem "capistrano-sidekiq" | |
#replace "require 'sidekiq/capistrano'" in Capfile | |
require 'capistrano/sidekiq' |