Skip to content

Instantly share code, notes, and snippets.

View thatdutchguy's full-sized avatar

Daniël van de Burgt thatdutchguy

  • SecretlyMexico
  • Seattle, WA
View GitHub Profile
@thatdutchguy
thatdutchguy / hardcode-sc_clk_tck.patch
Created March 16, 2021 15:54
Build Hatari emulator in SerenityOS
--- hatari-2.3.1/src/main.c 2020-12-26 13:39:26.000000000 -0800
+++ hatari-2.3.1-patched/src/main.c 2021-03-15 15:28:26.201725394 -0700
@@ -103,7 +103,7 @@
struct tms fields;
if (!ticks_to_msec)
{
- ticks_to_msec = sysconf(_SC_CLK_TCK);
+ ticks_to_msec = 100; // WAS: sysconf(_SC_CLK_TCK);
Log_Printf(LOG_INFO, "OS clock ticks / second: %d\n", ticks_to_msec);
/* Linux has 100Hz virtual clock so no accuracy loss there */
@thatdutchguy
thatdutchguy / gist:2be0d51294b7ccc9bf7f
Created August 1, 2014 01:36
Ruby Time.parse exception
~ » ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
~ » pry
[1] pry(main)> require 'time'
=> true
[2] pry(main)> time_string = "2013"
=> "2013"
[3] pry(main)> DateTime.parse time_string
ArgumentError: invalid date
from (pry):3:in `parse'
@thatdutchguy
thatdutchguy / gist:3763147
Created September 21, 2012 18:39
more problems installing railsexpress patches
--- ~ » rvm install 1.9.3-p194 --patch railsexpress --name railsexpress
Installing Ruby from source to: /Users/Daniel/.rvm/rubies/ruby-1.9.3-p194-railsexpress, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194-railsexpress - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194-railsexpress - #extracting ruby-1.9.3-p194 to /Users/Daniel/.rvm/src/ruby-1.9.3-p194-railsexpress
ruby-1.9.3-p194-railsexpress - #extracted to /Users/Daniel/.rvm/src/ruby-1.9.3-p194-railsexpress
Applying patch /Users/Daniel/.rvm/patches/ruby/1.9.3/p194/railsexpress/01-revert-f6b49243eb0c21bea1c4198cdd52a549e6ead075.patch
Applying patch /Users/Daniel/.rvm/patches/ruby/1.9.3/p194/railsexpress/02-backport-c2086cc7ff1142b14c95c8758af24b8689b78ffc.patch
Applying patch /Users/Daniel/.rvm/patches/ruby/1.9.3/p194/railsexpress/03-railsbench-gc.patch
Applying patch /Users/Daniel/.rvm/patches/ruby/1.9.3/p194/railsexpress/04-display-more-detailed-stack-trace.patch
Applying patch /Users/
@thatdutchguy
thatdutchguy / gist:3759167
Created September 21, 2012 00:48
rvm patch install trace
--- ~ » rvm reinstall 1.9.3-p125 --patch railsexpress --name railsexpress --trace
1.9.3-p125 --patch railsexpress --name railsexpress --trace
rvm 1.15.9 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
+__rvm_parse_args:637> [[ -n 4.3.11 ]]
+__rvm_parse_args:672> [[ -z reinstall ]]
+__rvm_parse_args:675> [[ error == reinstall || 0 -eq 1 || -n '' ]]
@thatdutchguy
thatdutchguy / gist:3759093
Created September 21, 2012 00:21
rvm patch error
--- ~ » rvm reinstall 1.9.3-p194 --patch railsexpress --name railsexpress 1 ↵
Removing /Users/Daniel/.rvm/src/ruby-1.9.3-p194-railsexpress...
/Users/Daniel/.rvm/rubies/ruby-1.9.3-p194-railsexpress has already been removed.
Installing Ruby from source to: /Users/Daniel/.rvm/rubies/ruby-1.9.3-p194-railsexpress, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194-railsexpress - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194-railsexpress - #extracting ruby-1.9.3-p194 to /Users/Daniel/.rvm/src/ruby-1.9.3-p194-railsexpress
ruby-1.9.3-p194-railsexpress - #extracted to /Users/Daniel/.rvm/src/ruby-1.9.3-p194-railsexpress
__rvm_apply_patches:17: failed to compile regex: repetition-operator operand invalid
Patch 'railsexpress/01-revert-f6b49243eb0c21bea1c4198cdd52a549e6ead075.patch' not found.
__rvm_apply_patches:17: failed to com
@thatdutchguy
thatdutchguy / fixvpn.txt
Created July 10, 2012 18:15
Fix OSX VPN
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.racoon.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.racoon.plist
describe "a car" do
before do
@car = Car.new
end
context "when started" do
before do
@car.start
end
@thatdutchguy
thatdutchguy / gist:909211
Created April 8, 2011 03:05
jenkins/stapler/fog.hpi build notes
git clone https://github.com/cowboyd/fog.hpi
git clone https://github.com/jenkinsci/jenkins
git clone https://github.com/stapler/stapler.git
git clone https://github.com/cowboyd/jenkins.rb
STAPLER:
cd stapler
mvn install
cd jruby
mvn install
# HACKY, first attempt
class CellRouter
class FakeController
attr_accessor :request, :config
end
class FakeCell < Cell::Rails
def initialize