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 '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
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
#!/usr/bin/env ruby | |
# A sneaky wrapper around Rubocop that allows you to run it only against | |
# the recent changes, as opposed to the whole project. It lets you | |
# enforce the style guide for new/modified code only, as opposed to | |
# having to restyle everything or adding cops incrementally. It relies | |
# on git to figure out which files to check. | |
# | |
# Here are some options you can pass in addition to the ones in rubocop: | |
# |
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 | |
INSTALL_DIR="$1" | |
if [ ! -d $INSTALL_DIR ]; then | |
echo "Install directory doesn't exist" | |
exit 1 | |
fi | |
mkdir -p jemalloc/build | |
cd jemalloc |
sudo apt-get install graphviz
#Clone jemalloc git clone https://github.com/jemalloc/jemalloc
./configure --enable-prof --enable-stats --enable-debug --enable-fill make make 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
bash_prompt_command() { | |
local K="\[\033[0;30m\]" # black | |
local R="\[\033[0;31m\]" # red | |
local G="\[\033[0;32m\]" # green | |
local Y="\[\033[0;33m\]" # yellow | |
local B="\[\033[0;34m\]" # blue | |
local M="\[\033[0;35m\]" # magenta | |
local C="\[\033[0;36m\]" # cyan | |
local W="\[\033[0;37m\]" # white | |
local NONE="\[\033[0m\]" |
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
db.currentOp().inprog.forEach( | |
function(op) { | |
if(op.secs_running > 5) printjson(op); | |
} | |
) |
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
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
Press minus + shift + s
and return
to chop/fold long lines!
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
desc 'Stop rails server' | |
task :stop do | |
File.new("tmp/pids/server.pid").tap { |f| Process.kill 9, f.read.to_i }.delete | |
end | |
desc 'Starts rails server' | |
task :start do | |
Process.exec("rails s puma -d") | |
end |
NewerOlder