- redstickmetal.com
- BR/NO/LA metal scene
- Bands
- Events
- Blog?
- BR/NO/LA metal scene
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 scanRemove(cursor, prefix, count) { | |
return redis | |
.scan(cursor, 'MATCH', `${prefix}*`, 'COUNT', count) | |
.then(([cur, keys]) => redis.del(keys).then(() => Promise.resolve(cur))) | |
.then(cur => (cur !== 0 && cur !== '0') ? scanRemove(cur, prefix, count) : Promise.resolve()); | |
} | |
function removeAllMatching(prefix, count=10) { | |
return scanRemove(0, prefix, count) | |
.catch(err => {throw new Error(`Scan-remove failed: ${err.message}`);}); |
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
class Desk < Formula | |
desc "Lightweight workspace manager for the shell" | |
homepage "https://github.com/jamesob/desk" | |
url "https://github.com/jamesob/desk/archive/v0.3.1.tar.gz" | |
sha256 "b687e2cfa742f763d689391f67a5b5225324e282a0fed100487b1570988d7758" | |
def install | |
bin.install "desk" | |
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
#!/bin/sh | |
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz | |
tar xzvf yaml-0.1.4.tar.gz | |
cd yaml-0.1.4 | |
./configure --prefix=/usr/local | |
make | |
make install | |
cd | |
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | |
tar xzvf ruby-1.9.3-p392.tar.gz |
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/sh | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
exec $SHELL -l | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
exec $SHELL -l | |
rbenv install 1.9.3-p374 |
⋊> ~ func-description func-description
Gets the description of a function
⋊> ~
class Foo < ActiveRecord::Base
belongs_to :bar, inverse_of: :foos
validates :some_attribute,
unmarked_for_destruction_uniqueness: {
parent: :bar
, children: :foos
# , message: "Some message"
}
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
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rack', github: 'rack/rack' | |
gem 'rails', github: 'rails/rails' | |
gem 'sqlite3' | |
GEMFILE | |
system 'bundle' | |
end |
I hereby claim:
- I am cmbankester on github.
- I am cmbankester (https://keybase.io/cmbankester) on keybase.
- I have a public key ASCyTmwo_SDYj2aJwZ4mrlYFnknPoxzR4gkAndEh77DMqQo
To claim this, I am signing this object:
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
# Install some deps with yum | |
yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel libcurl-devel | |
# Install ngx_pagespeed | |
cd /usr/local/src | |
NPS_VERSION=1.9.32.2 | |
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip | |
unzip release-${NPS_VERSION}-beta.zip | |
cd ngx_pagespeed-release-${NPS_VERSION}-beta/ | |
wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz |
OlderNewer