- Brium
- Cdc
- Verboice
- Otros...
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
| <html> | |
| <head> | |
| <script type="text/javascript"> | |
| function toggle() { | |
| var toggledDiv = document.getElementById('toggledDiv'); | |
| if (toggledDiv) { | |
| toggledDiv.parentNode.removeChild(toggledDiv); | |
| } else { | |
| toggledDiv = document.createElement('div'); | |
| toggledDiv.id = 'toggledDiv'; |
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
| if Rails.env == 'development' || Rails.env == 'test' | |
| def $stdout.puts_with_color(*args) | |
| print "\033[32m" | |
| puts_without_color *args | |
| print "\033[0m" | |
| end | |
| klass = class << $stdout; self; end | |
| klass.alias_method_chain :puts, :color |
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
| # Expects that a given ActiveRecord model will have the given records. | |
| # | |
| # Examples | |
| # -------- | |
| # | |
| # # Expect two people in the database with the given attributes | |
| # Person.should have_records [{name: 'David', age: 12}, {name: 'Peter', age: 13}] | |
| # | |
| # # Expect one person in the database with the given attributes | |
| # Person.should have_records name: 'David', age: 12 |
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
| # Swappable Mixins in CoffeeScript | |
| # ================================ | |
| # Many thanks to Hashmal, who wrote this to start. | |
| # https://gist.github.com/803816/aceed8fc57188c3a19ce2eccdb25acb64f2be94e | |
| # Usage | |
| # ----- | |
| # class Derp extends Mixin |
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
| #!/usr/bin/env ruby | |
| APP_PATH = File.expand_path('../../config/application', __FILE__) | |
| require File.expand_path('../../config/boot', __FILE__) | |
| require File.expand_path('../../config/environment', __FILE__) | |
| require 'csv' | |
| filename = File.expand_path('../FOSA-Table.csv', __FILE__) | |
| rows = CSV.read filename | |
| rows = rows[1 .. -1] |
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
| %Bar = type { i32 } | |
| %Foo = type { %Bar* } | |
| @.str5 = private constant [4 x i8] c"%d\0A\00", align 1 | |
| declare i32 @printf(i8* nocapture, ...) nounwind | |
| define i32 @main() ssp { | |
| entry: | |
| %Bar.i.i.i.i = alloca %Bar, align 8 |
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
| <? | |
| class Compressor { | |
| function compress($input, $output) { | |
| $input = fopen($input, 'r'); | |
| $output = fopen($output, 'w'); | |
| while($line = fread($input, 8)) { | |
| $lineLength = strlen($line); | |
| for($i = 0; $i < $lineLength; $i += 8) { | |
| $n = 0; |
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
| <? | |
| /* | |
| * Encrypts any number into a 10-digit cypher. | |
| * Oh, 10 here means 10 in a random base. | |
| */ | |
| class Encrypter | |
| { | |
| function encrypt($num) | |
| { | |
| $str = ""; |
