Skip to content

Instantly share code, notes, and snippets.

View tsyber1an's full-sized avatar
🎯
Focusing

Tsyren O. tsyber1an

🎯
Focusing
View GitHub Profile
@tsyber1an
tsyber1an / git_config
Created February 6, 2017 10:08 — forked from usutani/git_config
Git
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'
@tsyber1an
tsyber1an / tls-client.go
Created January 30, 2017 13:47 — forked from michaljemala/tls-client.go
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)
➜  ~ 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."
@tsyber1an
tsyber1an / remove_brew-mongo_osx.sh
Created December 22, 2015 13:10 — forked from katychuang/remove_brew-mongo_osx.sh
remove mongodb that was installed via brew
#!/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
@tsyber1an
tsyber1an / sidekiq.rb
Created December 1, 2015 10:14
sidekiq.rb
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
@tsyber1an
tsyber1an / web-servers.md
Created November 18, 2015 23:26 — forked from willurd/web-servers.md
Big list of http static server one-liners

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.

Discussion on reddit.

Python 2.x

$ 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