Getting started:
Related tutorials:
- MySQL-CLI: https://www.youtube.com/playlist?list=PLfdtiltiRHWEw4-kRrh1ZZy_3OcQxTn7P
- Analyzing Business Metrics: https://www.codecademy.com/learn/sql-analyzing-business-metrics
git config --global color.ui auto | |
git config --global core.editor vim | |
git config --global alias.st status | |
git config --global alias.br branch | |
git config --global alias.co checkout | |
git config --global alias.ci commit | |
git config --global alias.l 'log --color --graph --pretty=oneline --decorate --date=short --abbrev-commit --branches' | |
git config --global alias.ds 'diff --stat' |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) |
Getting started:
Related tutorials:
➜ ~ default wite com.apple.dashboard mcx-disabled -boolean YES
➜ ~ killall Dock
class MultiAppHandler | |
def initialize(default_app, extra_app) | |
@default_app = default_app | |
@extra_app = extra_app | |
end | |
def call(env) | |
request = Rack::Request.new(env) | |
extra_app_routes = @extra_app.routes[request.request_method] |
puts "rspec pid: #{Process.pid}" | |
trap 'USR1' do | |
threads = Thread.list | |
puts | |
puts "=" * 80 | |
puts "Received USR1 signal; printing all #{threads.count} thread backtraces." |
#!/usr/bin/env sh | |
# checks to see if running | |
launchctl list | grep mongo | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist | |
launchctl remove homebrew.mxcl.mongodb | |
pkill -f mongod |
if ENV["PROFILE"] | |
require "objspace" | |
ObjectSpace.trace_object_allocations_start | |
Sidekiq.logger.info "allocations tracing enabled" | |
module Sidekiq | |
module Middleware | |
module Server | |
class Profiler | |
# Number of jobs to process before reporting |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Factory.instance_eval do | |
def create_without_callbacks(factory_name, options = {}, &block) | |
factory = Factory.build(factory_name, options, &block) | |
factory.send(:create_without_callbacks) | |
factory | |
end | |
end |