View uncommitted
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! |
View pinentry-kwallet
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/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) |
View chaturbate.sh
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
#!/bin/sh | |
URL="${2}" | |
NAME="$(echo "${URL}" | sed 's#.*/\([^/]*\)/$#\1#')" | |
pgrep -f "/${NAME}-.*/playlist.m3u8" && exit | |
STREAM="$(curl -s "${URL}" | grep hlsSourceFast | sed -n 's#.*\(https://.*/playlist.m3u8\).*#\1#p')" | |
ROOT_DIR=$HOME/x | |
case "${1}" in | |
vlc|v) |
View concat
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) |
View remark2pdf.js
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
// 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; | |
} |
View lxc-backup
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 | |
# License : AGPLv3+ | |
import subprocess | |
import logging | |
import re | |
import os.path | |
import tempfile | |
from datetime import date, datetime, timedelta | |
import shutil |
View randomize.rb
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 '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 |
View discourse-sidekiq.service
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
[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 |
View Unicode.java
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
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"); | |
} | |
} |
View nuitdebout.rb
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
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; }'} | |
} + |