View sidekiq-upstart.conf.erb
1 2 3 4 5 6 7 8 9 10
#!upstart
description "Upstart Script for a Freefeed sidekiq process"
 
start on startup
stop on shutdown
 
respawn
 
setuid deploy
setgid deploy
View urlable.rb
1 2 3 4 5 6 7 8 9 10
require 'active_support/concern'
require 'addressable/uri'
require 'simpleidn'
require 'faraday'
 
# Normalize and validate URLs
module Urlable
extend ActiveSupport::Concern
 
included do
View revert.sh
1 2 3 4 5
$ cd /usr/local
$ git checkout b64d9b9c431642a7dd8d85c8de5a530f2c79d924 Library/Formula/node.rb
$ brew unlink node
$ brew install node
$ npm install -g npm@latest
View gulpfile.coffee
1 2 3 4 5 6 7 8 9
# ------------
# Task runners
# ------------
 
# Gulp builder
gulp = require 'gulp'
 
# Run tasks one by one
runSeq = require 'run-sequence'
View datetime.ru.yml
1 2 3 4 5 6 7 8 9 10
ru:
date:
formats:
# Форматы указываются в виде, поддерживаемом strftime.
# По умолчанию используется default.
# Можно добавлять собственные форматы
#
#
# Use the strftime parameters for formats.
# When no format has been given, it uses default.
View taxpayer_id.rb
1 2 3 4 5 6 7 8 9
class TaxpayerID
 
FACTORS = [ 3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8, 0 ]
 
def initialize value
@digits = value.to_s.chars.map(&:to_i)
raise ArgumentError, 'unexpected argument length (must be 10 or 12 chars)' unless @digits.length == 10 || @digits.length == 12
@result = (@digits.length == 10 ? check_ten : check_twelve)
end
View play.js.coffee
1 2 3 4 5 6 7 8 9 10
# --------------------
# Define Audio Context
# --------------------
window.AudioContext = window.AudioContext||window.webkitAudioContext
window.MyAudioContext = new AudioContext()
window.MyAudioDecodeAndPlay = (arrayBuffer) ->
MyAudioContext.decodeAudioData arrayBuffer, (buffer) ->
source = MyAudioContext.createBufferSource()
View .zshrc
1 2 3 4 5 6 7 8 9 10
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
 
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
 
# Example aliases
View Preferences.sublime-settings
1 2 3 4 5 6 7 8 9 10
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"drag_text": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "Cyrillic (Windows 1251)",
"font_size": 12,
"highlight_line": true,
"ignored_packages":
[
View cleanup_all_gemsets.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/sh
 
echo "NB! This process could be too destructive sometimes and you may need to run 'bundle' command from your project directory."
echo "Do you want to cleanup all gemsets?"
read -p "(anything other than 'yes' will cancel) > " ANSWER
 
if [[ $ANSWER != "yes" ]]
then
echo "Phew...\nMay be another day."
else
Something went wrong with that request. Please try again.