# application.rb:
config.exceptions_app = lambda do |env|
exception = env['action_dispatch.exception']
params = env['action_dispatch.request.parameters']
request = Rack::Request.new(env)
status_code = ActionDispatch::ExceptionWrapper.new(env, exception).status_code
Rails.logger.info [
// Faster solution for: | |
// http://www.boyter.org/2017/03/golang-solution-faster-equivalent-java-solution/ | |
// With threading. | |
// g++ -std=c++11 -Wall -Wextra -O3 -pthread | |
// On my computer (i5-6600K 3.50 GHz 4 cores), takes about ~160 ms after the CPU | |
// has warmed up, or ~80 ms if the CPU is cold (due to Turbo Boost). | |
// How it works: Start by generating a list of losing states -- states where the | |
// game can end in one turn. Generate a new list of states by running the game |
module Commands | |
module Meeting | |
AcceptSchema = Dry::Validation.Schema do | |
required(:user_id).filled | |
required(:status).value(eql?: :scheduled) | |
end | |
class Accept < Command | |
def call | |
return validate if validate.failure? |
source "https://rubygems.org" | |
gem "rack-proxy" | |
gem "sidekiq" | |
gem "sinatra" | |
gem "sinatra-contrib" | |
gem "py" |
A triangle workflow involves an upstream project and a personal fork containing a development branch of the project.
This configuration makes git pull
merge changes from the upstream but git push
send local commits to the personal fork.
However those config settings only work on relatively recent versions of git; 1.7.9 doesn't support the required remote.pushdefault
config setting so you will have to explicitly tell git push
which remote to push to.
This gist does not attempt to explain exactly what these commands do, it's intended as a cheat-sheet/reminder.
# perform a fresh install of Ubuntu 17.10 | |
# upgrade the kernel to v4.13.10 | |
mkdir ~/kernel-v4.13.10 | |
cd ~/kernel-v4.13.10 | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb | |
sudo dpkg -i *.deb |
My personal notes on Brian Copeland's blog series: Agile vs Fragile
(If you are unable to access the blog post, try using a US proxy or web-based proxy service e.g. http://hideme.be)
- Agile: focus on deliver valuable software to customer
- Fragile: focus on meeting delivery period
Principles of Adult Behavior
- Be patient. No matter what.
- Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
- Never assume the motives of others are, to them, less noble than yours are to you.
- Expand your sense of the possible.
- Don’t trouble yourself with matters you truly cannot change.
- Expect no more of anyone than you can deliver yourself.
- Tolerate ambiguity.
- Laugh at yourself frequently.
- Website: https://stimulusjs.org/
- GitHub repo: https://github.com/stimulusjs/stimulus
- Handbook: https://stimulusjs.org/handbook/introduction
- Discourse: https://discourse.stimulusjs.org/
initialize
: once, when the controller is first instantiatedconnect
: anytime the controller is connected to the DOM
# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt | |
From: mark@omnifest.uwm.edu (Mark Hopkins) | |
Newsgroups: alt.lang.asm | |
Subject: A Summary of the 80486 Opcodes and Instructions | |
(1) The 80x86 is an Octal Machine | |
This is a follow-up and revision of an article posted in alt.lang.asm on | |
7-5-92 concerning the 80x86 instruction encoding. | |
The only proper way to understand 80x86 coding is to realize that ALL 80x86 |