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
# /etc/hosts | |
127.0.0.1 search.local |
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 | |
# make this file executable before pushing: chmod +x lambda_start | |
args=("$@") | |
export NODE_OPTIONS='--require ./tracing.dist.js' | |
exec "${args[@]}" |
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
brew install gpg2 pinentry-mac | |
brew link --overwrite gnupg2 | |
git config --global gpg.program gpg2 | |
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf | |
echo "export GPG_TTY=$(tty)" >> ~/.bash_profile | |
# open new terminal, commit and save your pass in keychain, yay! |
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
ruby -e 'require "fileutils";Dir.glob("./**/*").reject { |d| File.directory?( d ) }.map { |f| [f, "/Volumes/Backup/iTunes/#{File.dirname(f).gsub(/([^\.])\//, "#{$1}-")}-#{File.basename(f)}"] }.map { |f| FileUtils.cp(f[0], f[1], verbose: true) }' |
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
AABmLmYyzTRmNgA4zTiaOWY6MzsAPGY8zTwzPZo9AD5mPs0+Mz+aPwAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
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
// rotate 90° CW: flip the transpose on Y | |
inline void rotate90CW(cv::Mat& input) | |
{ | |
cv::flip(input.t(), input, 1); | |
} | |
// rotate -90° CW: flip the transpose on X | |
inline void rotate90CCW(cv::Mat& input) | |
{ | |
cv::flip(input.t(), input, 0); |
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
# app/controllers/home_controller.rb | |
class HomeController < ApplicationController | |
def index | |
@news = News.get_recent | |
@notifications = current_user.notifications | |
end | |
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
# app/models/article.rb | |
class Article < ActiveRecord::Base | |
include Elasticsearch::Model | |
# include Elasticsearch::Model::Callbacks | |
after_update :update_elasticsearch_index | |
def update_elasticsearch_index | |
ElasticSearchWorker.perform_async(Article, id) |
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
# Gemfile | |
gem 'sidekiq' |
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
# Gemfile | |
gem 'redis', '~> 3.0.1' | |
gem 'hiredis', '~> 0.4.5' |
NewerOlder