Skip to content

Instantly share code, notes, and snippets.

View iblue's full-sized avatar
🕶️
"><script>alert(1);</script>{{1+1}}

iblue

🕶️
"><script>alert(1);</script>{{1+1}}
  • Mannheim, Germany
View GitHub Profile
0x3e67afeccfc07cf4d2975adfcd0448b3c67c53c2
/* Compile and run with gcc -std=c11 -ggdb -O3 -o fftaccess fftaccess.c && ./fftaccess */
#define WTF
#ifdef WTF
#define MAGIC (0)
#else
#define MAGIC (1)
#endif
@iblue
iblue / debug_this.rb
Created August 7, 2014 14:31
Interview Question :>
# NoMethodError: undefined method `attr_reader' for User:Class
#
# Why?
class User
def initialize(name)
@name = name
end
def hello
#include <stdio.h>
#include <math.h>
/*
* Compile and run:
*
* gcc -lm -march=native -O3 -o madelung madelung.c -lm && ./madelung
*/
#define STEPS 100000
@iblue
iblue / hax0rz teh garbage collector
Created November 13, 2013 16:16
Maximum pwnage
def bar
GC.start
c = ObjectSpace.each_object() {}
puts "Objects definied: #{c}"
end
bar
10000.times do |i|
"sym_#{i}".to_sym
def foo
bar
end
def bar
baz
end
def baz
foo
@iblue
iblue / embed.rb
Created July 8, 2012 18:13 — forked from netzpirat/embed.rb
ActiveRecord embedding
module ActiveRecord
# Allows embedding of ActiveRecord models.
#
# Embedding other ActiveRecord models is a composition of the two
# and leads to the following behaviour:
#
# - Nested attributes are accepted on the parent without the _attributes suffix
# - Mass assignment security allows the embedded attributes
# - Embedded models are destroyed with the parent when not appearing in an update again
# - Embedded documents appears in the JSON output
@iblue
iblue / register.rb
Created February 13, 2012 19:45
Register CeBIT Tickets
##########################
# #
# Be Watir, my friend... #
# #
##########################
require 'rubygems'
require 'watir-webdriver' # gem install watir-webdriver
ticket_code = 'yogg5'