Skip to content

Instantly share code, notes, and snippets.

View Nephos's full-sized avatar
💭
migrated to git.sceptique.eu

Arthur Poulet Nephos

💭
migrated to git.sceptique.eu
View GitHub Profile
'use strict';
module.exports = function(Atom) {
Atom.list = function(cb) {
cb(null, {"w": 1, "n": 1, "name": "Hydrogene"});
}
Atom.remoteMethod(
'list', {
http: {
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 = {
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
#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>
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
class Array
def average
self.sum / self.size.to_f
end
def sum
self.reduce(0) { |l, r| l + r }
end
# TODO: check
#!/usr/bin/env sh
echo "Pirate flag raised" > /tmp/vulnerable
echo "Pirate flag raised: true"
echo
#!/usr/bin/env ruby
# script pingtracer 0.1
# written by poulet_a
class PingError < StandardError; end
class ParseError < PingError; end
class Ping
#!/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)