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
@Nephos
Nephos / keybase.md
Created February 28, 2017 08:20
keybase.md

Keybase proof

I hereby claim:

  • I am nephos on github.
  • I am nephos (https://keybase.io/nephos) on keybase.
  • I have a public key ASAGJnH8kORt3Y9uTVh1h2BJxsZNz6eC8NuQSlzI8LELMwo

To claim this, I am signing this object:

#!/usr/bin/env ruby
# coding: utf-8
NAMES = {
"kalatz_a" => "Alexandre Kalatzis",
"poulet_a" => "Arthur Poulet",
"broggi_t" => "Thibaut Broggi",
"dispot_a" => "Lucie Dispot",
"dezeri_e" => "Emilie Dézériaud",
"douzie_l" => "Ludovic Douziech",
require "./DashBot/*"
require "CrystalIrc"
require "rollable"
module DashBot
def start
bot = CrystalIrc::Bot.new ip: "irc.mozilla.org", nick: "Dasshy", read_timeout: 300_u16
bot.on("JOIN") do |msg|
if msg.hl == bot.nick.to_s
@Nephos
Nephos / journee
Last active July 30, 2016 13:59
robot for journee-mondale.com to get the current celebration
#!/usr/bin/env ruby
require "mechanize"
a = Mechanize.new
a.get "http://www.journee-mondiale.com/"
node_journee = a.page.at "#journeesDuJour"
titles = node_journee.search("h2").map{|n| "- #{n.text}"}
module Sort
def self.sort_bead(tab)
@c = 0
tab = _sort_bead_columns(
_sort_bead_columns(
tab.map{|e| [1] * e.abs}
)
).map(&:size)
return { complexity: @c, result: tab.reverse }
complete -c crystal -n '__fish_crystal_no_subcmd' -fa compile -d "compile the specified file"
complete -c crystal -n '__fish_crystal_no_subcmd' -fa run -d "run the specified file as a program"
complete -c crystal -n '__fish_crystal_no_subcmd' -fa spec -d "run the unit test in ./spec"
complete -c crystal -n '__fish_crystal_no_subcmd' -fa docs -d "generate the documentation"
complete -c crystal -n '__fish_crystal_no_subcmd' -fa deps -d "install the dependencies"
complete -c crystal -n '__fish_crystal_no_subcmd' -fa env
complete -c crystal -n '__fish_crystal_no_subcmd' -fa eval
complete -c crystal -n '__fish_crystal_no_subcmd' -fa play
complete -c crystal -n '__fish_crystal_no_subcmd' -fa tool
complete -c crystal -n '__fish_crystal_no_subcmd' -fa help -d "display the help screen"
#!/usr/bin/env ruby
require 'prawn'
require 'prawn/templates'
module Watermarker
def apply(document, image_path, page_idx = 1, image_opts = {}, text_data = nil, text_opts = {})
document.go_to_page page_idx
document.image image_path, image_opts if image_path
#!/usr/bin/env ruby
# Note: this code works also in crystal :)
# Just replace the shebang "ruby" by "crystal" or build it
require "tempfile"
require "uri"
uploader = ENV.fetch("TRANSFER_HOST") { "https://up.nephos.xyz" }
base = File.basename(ARGV[0])
diff --git a/src/http/request.cr b/src/http/request.cr
index 5c005ee..0deffcf 100644
--- a/src/http/request.cr
+++ b/src/http/request.cr
@@ -87,7 +87,7 @@ class HTTP::Request
value
end
- private def uri
+ def uri
require "./bench1_c/*"
module Bench1C
# TODO Put your code here
def self.incr : UInt64
a = 0_u64
(0...999999999).each do |i|
a = a + 1
end