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
if (getLangOpts().InterceptAllocationFunctions && | |
getLangOpts().RTTI) { | |
bool UseSize = false; | |
IdentifierInfo *DeleteInterceptInfo = | |
&PP.getIdentifierTable().get("__op_delete_intercept__"); | |
DeclareGlobalAllocatorInterceptFunctions( | |
DeclarationName(DeleteInterceptInfo), UseSize); | |
LookupResult R(*this, DeleteInterceptInfo, SourceLocation(), | |
LookupOrdinaryName); |
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
Large Object Motions: | |
( | |
) | |
{ | |
} | |
[[ | |
[] | |
][ | |
]] | |
[m |
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
// Implementation of a UDP proxy | |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net" | |
"os" |
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
<!-- Override Gist styling --> | |
<style type="text/css"> | |
iframe{background-color: #0a0a0a;} | |
div.gist-syntax {background-color:#0a0a0a!important;} | |
div.gist {color:#ccc!important;} | |
span.nt, span.kd, span.k, span.o{color:aliceblue!important;} | |
.gist .gist-file{border-color:#444!important;} | |
.gist .gist-file .gist-meta{background-color:#0a0a0a!important;} | |
</style> |
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
--- redirect.rb 2012-04-09 11:58:39.905024214 +0300 | |
+++ redirect-pages.rb 2012-04-09 11:58:10.441025135 +0300 | |
@@ -15,9 +15,9 @@ | |
# find all posts with a redirect property and create a new page for each entry | |
def generate_redirects(site) | |
- site.posts.select{|x| x.data.key? 'redirects' }.each do |p| | |
+ (site.pages + site.posts).select{|x| x.data.key? 'redirects' }.each do |p| | |
p.data['redirects'].each do |r| | |
- redirect = RedirectPage.new(site, site.source, r, p.id) |
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 | |
mkdir /tmp/curl-ca-bundle | |
cd /tmp/curl-ca-bundle | |
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2 | |
tar xzf curl-7.22.0.tar.bz2 | |
cd curl-7.22.0/lib/ | |
./mk-ca-bundle.pl | |
if [ ! -d /usr/share/curl/ ]; then | |
sudo mkdir -p /usr/share/curl/ | |
else |
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
package main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" |
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
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
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 python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |
NewerOlder