This file contains 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 'awesome_print' | |
require 'pg' | |
require 'json' | |
con = PG.connect host: 'localhost', user: 'postgres', password: 'postgres', dbname: 'privatebin' | |
files = Dir['**/*.php'].sort | |
con.exec 'TRUNCATE TABLE paste' |
This file contains 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
[42] pry(main)> f = Hash.new { [] } | |
=> {} | |
[43] pry(main)> f[:foo] << :bar | |
=> [:bar] | |
[44] pry(main)> f | |
=> {} | |
[45] pry(main)> f.keys | |
=> [] | |
[46] pry(main)> f[:bar] | |
=> [] |
This file contains 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
COMPOSE_PROJECT_NAME=cozy-https |
This file contains 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 | |
# GPGIt : Automatically GPG-encrypt incoming email | |
# Aeris <aeris@imirhil.fr> | |
# Licensed under AGPLv3 or later | |
import email | |
import sys, os | |
import re | |
from pyme.core import Data, Context | |
from email.mime.base import MIMEBase |
This file contains 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
// Pour les LED | |
#define LED_PIN_1 2 | |
#define LED_PIN_2 3 | |
#define LED_PIN_3 4 | |
#define LED_PIN_4 5 | |
// Pour le capteur d’inclinaison | |
#define BUTTON_PIN 6 | |
#define BUTTON_ACTIVE_LEVEL LOW |
This file contains 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
// License: AGPLv3 | |
#include <Servo.h> | |
#define MIN_DURATION 200 | |
#define MAX_DURATION 500 | |
#define MIN_FREEZE 100 | |
#define MAX_FREEZE 200 | |
#define LASER_PIN 9 | |
class PanTilt { |
This file contains 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 | |
# License AGPLv3 (https://www.gnu.org/licenses/agpl-3.0.txt) | |
IMAPS_SERVER = 'xxx' | |
IMAPS_USER = 'xxx' | |
RSPAMC_HOST = 'xxx' | |
AKONADI_ACCOUNT = 'xxx' | |
KWALLET_APP = 'gpgit-rspamc-learn' | |
require 'awesome_print' | |
require 'net/imap' |
This file contains 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 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 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) |