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 | |
require 'typhoeus' | |
require 'oj' | |
require 'base64' | |
require 'fileutils' | |
def get(url, params = {}) | |
res = Typhoeus.get url, params: params, headers: {'Accept' => 'application/json'} | |
Oj.load(res.body) | |
end |
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 | |
require 'find' | |
require 'open3' | |
require 'optparse' | |
require 'ostruct' | |
options = OpenStruct.new | |
OptionParser.new do |opts| | |
opts.on('-u', '--[no-]untrack', 'Include untracked files') { |v| options.untrack = v } | |
end.parse! |
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/python3 | |
# -*- coding: utf-8 -*- | |
# AGPLv3 license | |
import dbus, logging, os, re, subprocess, sys, threading | |
LOGGER = logging.getLogger("kwallet") | |
hdlr = logging.FileHandler("/tmp/pinentry-kwallet.log") | |
formatter = logging.Formatter("%(levelname)s %(message)s") | |
hdlr.setFormatter(formatter) | |
#LOGGER.addHandler(hdlr) |
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 | |
require 'tempfile' | |
require 'open3' | |
class Args | |
def initialize | |
@args = [] | |
end | |
def <<(args) |
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
// Licence : AGPLv3+ | |
"use strict"; | |
var page = require('webpage').create(), | |
system = require('system'), | |
address, output, size, pageWidth, pageHeight; | |
String.prototype.padLeft = function (length, character) { | |
return new Array(length - this.length + 1).join(character || '0') + this; | |
} |
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 python | |
# License : AGPLv3+ | |
import subprocess | |
import logging | |
import re | |
import os.path | |
import tempfile | |
from datetime import date, datetime, timedelta | |
import shutil |
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 | |
require 'openssl' | |
BLOCK_SIZE = 1024*1024 # 1M | |
CIPHER_BLOCK_SIZE = 128 | |
loop do | |
n = 0 | |
cipher = OpenSSL::Cipher::AES.new CIPHER_BLOCK_SIZE, :CBC | |
cipher.encrypt |
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
[Unit] | |
Description=Discourse Sidekiq | |
Requires=redis-server.service | |
After=redis-server.service | |
[Service] | |
User=www-data | |
WorkingDirectory=/srv/www/discourse | |
Environment=RBENV_ROOT=/usr/local/rbenv | |
Environment=RAILS_ENV=production |
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
public class Unicode { | |
public static void main(String[] args) { | |
if ( true ) { | |
// \u000A\u007D\u0020\u0065\u006C\u0073\u0065\u0020\u007B | |
System.out.println("True"); | |
// \u000A\u007D\u0020\u0069\u0066\u0020\u0028\u0020\u0066\u0061\u006C\u0073\u0065\u0020\u0029\u0020\u007B | |
} else { | |
System.out.println("False"); | |
} | |
} |
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 'cgi' | |
require 'date' | |
cgi = CGI.new 'html5' | |
cgi.out { | |
cgi.html { | |
cgi.head { | |
cgi.meta(charset: 'utf-8') + | |
cgi.title { '#NuitDebout' } + | |
cgi.style { 'body { font-size: 30pt; } p { margin: auto; width: 75%; background-color: #eee; text-align: center; padding: 50px; border-radius: 20px; }'} | |
} + |