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 | |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y yarn | |
sudo apt-get install -y nodejs | |
gem install bundler rake | |
bundle install |
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
[alias] | |
co = checkout | |
ci = commit | |
cl = clean | |
st = status | |
br = branch | |
up = pull --rebase | |
pr = pull --rebase | |
last = log -1 HEAD | |
olog = log --oneline |
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 AppConfig | |
@$inject: [] | |
constructor: () -> | |
# Dirty XHR hack | |
XMLHttpRequest::setRequestHeader = ((sup) -> | |
(header, value) -> | |
if header is '__XHR__' and angular.isFunction(value) | |
value @ | |
else | |
sup.apply @, arguments |
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
#!upstart | |
description "Upstart Script for a Freefeed sidekiq process" | |
start on startup | |
stop on shutdown | |
respawn | |
setuid deploy | |
setgid deploy |
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 'active_support/concern' | |
require 'addressable/uri' | |
require 'simpleidn' | |
require 'faraday' | |
# Normalize and validate URLs | |
module Urlable | |
extend ActiveSupport::Concern | |
included do |
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
$ cd /usr/local | |
$ git checkout b64d9b9c431642a7dd8d85c8de5a530f2c79d924 Library/Formula/node.rb | |
$ brew unlink node | |
$ brew install node | |
$ npm install -g npm@latest |
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
# ------------ | |
# Task runners | |
# ------------ | |
# Gulp builder | |
gulp = require 'gulp' | |
# Run tasks one by one | |
runSeq = require 'run-sequence' |
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
ru: | |
date: | |
formats: | |
# Форматы указываются в виде, поддерживаемом strftime. | |
# По умолчанию используется default. | |
# Можно добавлять собственные форматы | |
# | |
# | |
# Use the strftime parameters for formats. | |
# When no format has been given, it uses default. |
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 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 |
NewerOlder