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
import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
import java.math.BigInteger; | |
import java.security.*; | |
public class Main { | |
public static void main(String[] args) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeyException, SignatureException { | |
// Crypto setup |
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 | |
# in case it's already installled | |
vagrant plugin uninstall vagrant-libvirt | |
# vagrant's copy of curl prevents the proper installation of ruby-libvirt | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so{,.backup} | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so.4{,.backup} | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so.4.4.0{,.backup} | |
sudo mv /opt/vagrant/embedded/lib/pkgconfig/libcurl.pc{,.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
#!/bin/sh | |
nginxpidfile=/var/run/nginx.pid | |
if [ ! -e ${nginxpidfile} ]; then | |
echo "nginx pid file (${nginxpidfile}) not found" >&2 | |
exit 1 | |
fi | |
ppid=`cat ${nginxpidfile}` |
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 python3 | |
# encoding: utf-8 | |
"""Use instead of `python3 -m http.server` when you need CORS""" | |
from http.server import HTTPServer, SimpleHTTPRequestHandler | |
class CORSRequestHandler(SimpleHTTPRequestHandler): | |
def end_headers(self): | |
self.send_header('Access-Control-Allow-Origin', '*') |
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
;----------------------------------------------; | |
; | |
; A minimal bootloader that prints a hello world | |
; then halts. | |
; | |
; nasm -f bin hello-boot.asm -o hello-boot.bin | |
; | |
; @YouriAckx | |
; | |
;----------------------------------------------; |
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/bash | |
# build the environment | |
mkdir tessenv; cd tessenv | |
TROOT=`pwd` | |
mkdir $TROOT/stockfonts; mkdir $TROOT/build; mkdir $TROOT/build/eng | |
echo "Environment built" | |
# Get the stock english fonts from Google (old, but they work) | |
cd $TROOT/stockfonts | |
GET http://tesseract-ocr.googlecode.com/files/boxtiff-2.01.eng.tar.gz > boxtiff-2.01.eng.tar.gz |
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
#include <tunables/global> | |
/usr/bin/skype { | |
#include <abstractions/base> | |
#include <abstractions/user-tmp> | |
#include <abstractions/audio> | |
#include <abstractions/nameservice> | |
#include <abstractions/ssl_certs> | |
#include <abstractions/fonts> | |
#include <abstractions/ibus> | |
#include <abstractions/dbus> |