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
'use strict'; | |
module.exports = function(Atom) { | |
Atom.list = function(cb) { | |
cb(null, {"w": 1, "n": 1, "name": "Hydrogene"}); | |
} | |
Atom.remoteMethod( | |
'list', { | |
http: { |
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 Cthulhu | |
extend self | |
def fools!(data : String) | |
data.split(' ').map do |word| | |
R[word]? || word | |
end.join(' ') | |
end | |
# ah action, e.g. greet, eat, do | |
R = { |
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
diff --git a/src/compiler/crystal/codegen/codegen.cr b/src/compiler/crystal/codegen/codegen.cr | |
index 943eb0f99..94c847374 100644 | |
--- a/src/compiler/crystal/codegen/codegen.cr | |
+++ b/src/compiler/crystal/codegen/codegen.cr | |
@@ -335,7 +335,7 @@ module Crystal | |
# Always run verifications so we can catch bugs earlier and more often. | |
# We can probably remove this, or only enable this when compiling in | |
# release mode, once we reach 1.0. | |
- mod.verify | |
+ # mod.verify |
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 <dirent.h> | |
#include <dlfcn.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |
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
require "benchmark" | |
def f2(str) | |
str.gsub(/\[\[([[:alnum:]\-\/]+)\]\]/, "[\\1](/pages/\\1)") | |
end | |
def f3(str) | |
cursor = 0 | |
String.build do |b| | |
while cursor < str.size |
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
require "mechanize"; puts Mechanize.new.get("https://www.google.com/search?tbm=isch&q=snoop+dogg&tbs=imgo:1&gws_rd=cr&ei=PuZaWfizMsrwUOLbg-gH").image_urls.sample |
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 Array | |
def average | |
self.sum / self.size.to_f | |
end | |
def sum | |
self.reduce(0) { |l, r| l + r } | |
end | |
# TODO: check |
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 sh | |
echo "Pirate flag raised" > /tmp/vulnerable | |
echo "Pirate flag raised: true" | |
echo |
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 | |
# script pingtracer 0.1 | |
# written by poulet_a | |
class PingError < StandardError; end | |
class ParseError < PingError; end | |
class Ping |
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 | |
data = File.read(ARGV[0]) | |
data.gsub!(/(\d\.\d\d)(\d+)/, '\1') | |
data.gsub!(/(\d\d\.\d)(\d+)/, '\1') | |
data.gsub!(/[[:space:]]+/, ' ') | |
data = data.split("\n").map(&:strip).join | |
File.write(ARGV[1], data) |