Skip to content

Instantly share code, notes, and snippets.

Per Andersen lalala

Block or report user

Report or block lalala

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9fd56b2eead037bcfc58
def fizz n
eval 'return'[0..(n*6)-(101*6)-1]
s = [["Fizz"][n%3], ["Buzz"][n%5]].join
puts (s + n.to_s)[0..(s.length - 1)]
fizz n + 1
fizz 1
View gist:56687ee231d588e28154
"id": 1,
"title": "foo",
View gist:6777971
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
View gist:3294350
# passenger-install-nginx-module
Welcome to the Phusion Passenger Nginx module installer, v3.0.15.
This installer will guide you through the entire installation process. It
shouldn't take more than 5 minutes in total.
Here's what you can expect from the installation process:
1. This installer will compile and install Nginx with Passenger support.
2. You'll learn how to configure Passenger in Nginx.
View gist:3195148
/etc grep '^lib/' /var/lib/pacman/local/*/files
View gist:2828390
cat .log
!SESSION 2012-05-29 11:38:41.331 -----------------------------------------------
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.jface 2 0 2012-05-29 11:38:49.911
!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
View gist:2481932
{"connected":true,"data":{"success":true}}<!-- start log messages -->
<table class="yiiLog" width="100%" cellpadding="2" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;">
<th style="background:black;color:white;" colspan="5">
Application Log
<tr style="background-color: #ccc;">
<th style="width:120px">Timestamp</th>
View gist:2387717
rack-alive (master) bundle install ruby-1.9.3@test
Fetching gem metadata from
Using rake (
Using bundler (1.1.0)
Installing ffi (1.0.11) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at so that we can fix it. Thanks!
/home/per/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/home/per/.rvm/rubies/ruby-1.9.3-head/bin/ruby extconf.rb
checking for ffi_call() in -lffi... yes
checking for ffi_prep_closure()... yes
View gist:2387453
/home/per/.rvm/rubies/ruby-1.9.3-head/bin/ruby extconf.rb
creating Makefile
compiling generator.c
generator.c: In function ‘cState_aref’:
generator.c:632:5: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
generator.c: In function ‘isArrayOrObject’:
generator.c:867:5: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
generator.c:863:10: warning: unused variable ‘c’ [-Wunused-variable]
View gist:2159331
* {
padding: 0;
margin: 0;
You can’t perform that action at this time.