Skip to content

Instantly share code, notes, and snippets.

@ael-code
ael-code / https.config
Created December 10, 2014 14:28
ssl/tls nginx config from mozzilla
#compatibility ciphers
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA";
#permissive ciphers
#ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
#ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-R
@ael-code
ael-code / book_search.html
Last active August 31, 2016 17:59
Simple books suggestion using google books api
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Book Test</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style>
[Unit]
Description=Libreant
Wants=network-online.target
After=network-online.target
[Service]
Environment="LIBREANT_SETTINGS=/etc/libreant/libreant.cfg"
User=root
Group=root
ExecStart=/opt/libreant/ve/bin/libreant
[Unit]
Description=VBox Virtual Machine %i Service
Requires=systemd-modules-load.service
After=systemd-modules-load.service
[Service]
User=username
Group=vboxusers
ExecStart=/usr/bin/VBoxHeadless -s %i
ExecStop=/usr/bin/VBoxManage controlvm %i savestate
@ael-code
ael-code / 00base.sh
Last active May 27, 2016 22:42 — forked from boyska/00base.sh
test libreant upgrade
#!/bin/bash
basedir=$(readlink -f $(dirname $0))
source "$basedir/config"
source "$basedir/lib-run.sh"
set -e
set -u
run /bin/bash do-base.sh
import json
import string
import sys
import re, os
import logging
from archivant import Archivant
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("elasticsearch").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for mpicc... mpicc
checking for gcc... (cached) mpicc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
@ael-code
ael-code / parser.py
Created January 19, 2017 18:21
stupid parser
import re
NUM_REGEXP = "[0-9]+\.?[0-9]*"
def parse_data(input_file):
with open(input_file, 'r') as fb:
num = parse_single_number(fb)
matrix = parse_matrix(fb, cast=float)
fb.readline()
@ael-code
ael-code / data.txt
Last active February 16, 2017 15:27
rootsim report
****************************
* ROOT-Sim Configuration *
****************************
Cores: 16 available, 4 used
Number of Logical Processes: 64
Output Statistics Directory: ~/rootsim/outputs/rootsim_TA-0.3_CC-1000_4_4_64__2739546_stats
Scheduler: 0
MPI multithread support: no
GVT Time Period: 1.00 seconds
Checkpointing Type: 2
@ael-code
ael-code / rootsim_run.sh
Last active September 26, 2017 10:09
roortsim_run
#!/bin/bash
export RS_BUILD_DIR=/tmp/rsbuild
#export RS_BUILD_DIR=/nfs/site/home/macabral/devel/tmp/ROOT-Sim-install
echo "####### CONFIGURING #######"
echo "RS_BUILD_DIR=${RS_BUILD_DIR}"
autoreconf -if