This file contains hidden or 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
0x3e67afeccfc07cf4d2975adfcd0448b3c67c53c2 |
This file contains hidden or 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
/* 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 |
This file contains hidden or 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
# NoMethodError: undefined method `attr_reader' for User:Class | |
# | |
# Why? | |
class User | |
def initialize(name) | |
@name = name | |
end | |
def hello |
This file contains hidden or 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
#include <stdio.h> | |
#include <math.h> | |
/* | |
* Compile and run: | |
* | |
* gcc -lm -march=native -O3 -o madelung madelung.c -lm && ./madelung | |
*/ | |
#define STEPS 100000 |
This file contains hidden or 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
def bar | |
GC.start | |
c = ObjectSpace.each_object() {} | |
puts "Objects definied: #{c}" | |
end | |
bar | |
10000.times do |i| | |
"sym_#{i}".to_sym |
This file contains hidden or 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
def foo | |
bar | |
end | |
def bar | |
baz | |
end | |
def baz | |
foo |
This file contains hidden or 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
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 |
This file contains hidden or 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
########################## | |
# # | |
# Be Watir, my friend... # | |
# # | |
########################## | |
require 'rubygems' | |
require 'watir-webdriver' # gem install watir-webdriver | |
ticket_code = 'yogg5' |