Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
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
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers |
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
<?php | |
register_tick_function(function() { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | |
$last = reset($bt); | |
$info = sprintf("%s +%d\n", $last['file'], $last['line']); | |
file_put_contents('/tmp/segfault.txt', $info, FILE_APPEND); | |
// or | |
// file_put_contents('php://output', $info, FILE_APPEND); | |
}); |
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
// -*- compile-command: "nvcc -m 32 -arch sm_35 -Xptxas=-v,-abi=no -cubin sha256.cu"; -*- | |
// | |
// Copyright 2013 Allan MacKinnon <allanmac@alum.mit.edu> | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining | |
// a copy of this software and associated documentation files (the | |
// "Software"), to deal in the Software without restriction, including | |
// without limitation the rights to use, copy, modify, merge, publish, | |
// distribute, sublicense, and/or sell copies of the Software, and to |
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
require 'ruby_gntp' | |
Weechat.register "notify", "otters", "0.2", "GPL", "notify: A real time notification system for weechat", "", "" | |
Settings = { | |
:show_hilights => "on", | |
:show_priv_msg => "on" | |
} | |
def notify_show data, buffer, empty, tagsn, isdisp, ishilight, prefix, msg |
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
# Usage: | |
# rails_ssh release cron | |
# => ssh release@ec2-xx-xx-xx-xx.compute-1.amazonaws.com | |
rails_ssh() | |
{ | |
username=$1 | |
hostname="$(ruby $HOME/Scripts/parse_cap_config.rb $2)" | |
ssh $username@$hostname | |
} |
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
class RBLineProfiler | |
WALL_TIME_LIMIT = 10e3 # ms | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
result = nil | |
profile = lineprof(/./) { result = @app.call(env) } |
Either copy the aliases from the .gitconfig
or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4
- creates local branchpr/4
from the githubupstream
(if it exists) ororigin
remote and checks it outgit pr 4 someremote
- creates local branchpr/4
fromsomeremote
remote and checks it out
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
multiline { | |
tags => ["rails"] | |
pattern => "^Started" | |
negate => true | |
what => "previous" | |
} |
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
"exception": "Net::HTTPServerException: deploy_revision[wikiposit] (/var/chef/cache/cookbooks/application/providers/default.rb line 122) had an error: Net::HTTPServerException: template[/etc/unicorn/wikiposit.rb] (/var/chef/cache/cookbooks/unicorn/definitions/unicorn_config.rb line 38) had an error: Net::HTTPServerException: 403 \"Forbidden\"", | |
"backtrace": [ | |
"/opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:2632:in `error!'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/rest.rb:259:in `block in streaming_request'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/rest.rb:280:in `retriable_rest_request'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/rest.rb:236:in `streaming_request'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/rest.rb:97:in `get'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/cookbook/remote_file_vendor.rb:63:in `get_filename'", | |
"/opt/chef/embedded/lib/ruby/gems |