Skip to content

Instantly share code, notes, and snippets.

View pwnall's full-sized avatar
🎯
Currently focused on the needs of Fuchsia

Victor Costan pwnall

🎯
Currently focused on the needs of Fuchsia
View GitHub Profile
@pwnall
pwnall / fedora_kernel37.sh
Created December 1, 2012 03:51 — forked from mikefaille/Fed_install_3.7_rc6_krnl
Fedora install kernel 3.7 rc7 x64
sudo yum install http://kojipkgs.fedoraproject.org/packages/kernel/3.7.0/0.rc7.git0.1.fc19/x86_64/kernel-3.7.0-0.rc7.git0.1.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org/packages/kernel/3.7.0/0.rc7.git0.1.fc19/x86_64/kernel-devel-3.7.0-0.rc7.git0.1.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org/packages/kernel/3.7.0/0.rc7.git0.1.fc19/x86_64/kernel-headers-3.7.0-0.rc7.git0.1.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org/packages/kernel/3.7.0/0.rc7.git0.1.fc19/x86_64/kernel-modules-extra-3.7.0-0.rc7.git0.1.fc19.x86_64.rpm --nogpg
@pwnall
pwnall / chrome_android_buid.md
Last active December 14, 2015 11:09
Step-by-step instructions for setting up a VM that builds Chrome for Android

Build Instructions for libchromewebview.so

This document contains step-by-step instructions for building a Chromium-powered Android WebView.

Chromium's build process is a bit fussy, and the Android target is even more fussy, so the least painful way of getting it done is to set up a VM with the exact software that the build process was designed for. The steps below accomplish this.

@pwnall
pwnall / 00-mapnik_failed_1082.md
Last active December 14, 2015 12:09
mapnik failed to build on 10.8.2

The output from HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install mapnik

  • stdout is in brew_install_stdout.log
  • stderr is in brew_install_stderr.log

The contents of ~/Library/Logs/Homebrew/mapnik/config.log is in library_logs_homebrew_mapnik_config.log

The output from brew doctor is in brew_doctor_output.log

@pwnall
pwnall / rice-1.4.3-on-fedora18.log
Created March 16, 2013 06:40
The rice gem (1.4.3) fails to install on Fedora 18 due to extension compilation errors.
/home/pwnall/.rbenv/versions/1.9.3-p194/bin/ruby extconf.rb
extconf.rb:20: Use RbConfig instead of obsolete and deprecated Config.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
@pwnall
pwnall / gist:5523050
Created May 6, 2013 02:23
middleman-sprockets crashes middleman 3.1.beta (and master)
/home/pwnall/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/bundler/gems/middleman-sprockets-e5806151a349/lib/middleman-sprockets/sass_function_hack.rb:18:in `image_url': undefined local variable or method `sprockets_context' for #<Sass::Script::Functions::EvaluationContext:0x0000000153c9f0> (NameError)
(in /home/pwnall/workspace/mm-sprockets/source/stylesheets/all.css.sass)
from /home/pwnall/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/sass-3.2.8/lib/sass/script/funcall.rb:112:in `_perform'
from /home/pwnall/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/sass-3.2.8/lib/sass/script/node.rb:40:in `perform'
from /home/pwnall/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/sass-3.2.8/lib/sass/tree/visitors/perform.rb:298:in `visit_prop'
from /home/pwnall/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/sass-3.2.8/lib/sass/tree/visitors/base.rb:37:in `visit'
from /home/pwnall/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/sass-3.2.8/lib/sass/tree/visitors/perform.rb:100:in `visit'
@pwnall
pwnall / rails_routing_format_bug.rb
Created December 22, 2015 02:23
Executable test case for rails 5.0 routing format bug
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# Activate the gem you are reporting the issue against.
@pwnall
pwnall / ll_test.rb
Created September 14, 2013 08:03
Test whether a Ruby VM has the hooks we need to implement label propagation for Police.
class LabeledString < String
def +(other)
LabeledString.new original_plus(other)
end
end
class String
alias_method :original_plus, :+
def +(other)
@pwnall
pwnall / google_form_voter.rb
Created October 6, 2013 20:41
Mechanizing a Google Form
require 'mechanize'
loop do
agent = Mechanize.new
agent.user_agent_alias = 'Mac Safari'
puts "Fetching form"
page = agent.get "https://docs.google.com/forms/d/15a7OlkEn9qDCxyG23a4ilS6SRa0c61p4el222OFqRAk/viewform"
@pwnall
pwnall / clocks.html
Created November 28, 2013 03:02
Experiment that measures the drift between the V8 clock and the Blink clock.
<!DOCTYPE html>
<script>
// Maximum difference between Blink's clock and V8's.
var maxDelta = 0;
// Measure clock differences for 30 seconds.
//
// Browsers will stop our JavaScript if it runs for too long without returning
@pwnall
pwnall / time.html
Created November 28, 2013 02:57
Experiment for proving that Date.now() goes back quite often by quite a bit in V8 on Windows.
<!DOCTYPE html>
<script>
// Watch out for the clock going backwards for 30 seconds.
//
// Browsers will stop our JavaScript if it runs for too long without returning
// control to the event loop.
var smallTest = function() {
var startTime = Date.now();