Skip to content

Instantly share code, notes, and snippets.

View illusionfield's full-sized avatar

Hoffy illusionfield

View GitHub Profile
@enzanki-ars
enzanki-ars / update-ffmpeg-rpi.sh
Last active December 4, 2023 21:36
Install/Update FFmpeg with hardware acceleration on the Raspberry Pi
#!/bin/bash
# #########################################################
#
# WW WW AAA RRRRRR NN NN IIIII NN NN GGGG
# WW WW AAAAA RR RR NNN NN III NNN NN GG GG
# WW W WW AA AA RRRRRR NN N NN III NN N NN GG
# WW WWW WW AAAAAAA RR RR NN NNN III NN NNN GG GG
# WW WW AA AA RR RR NN NN IIIII NN NN GGGGGG
#
// PhantomJS Cheatsheet
$ brew update && brew install phantomjs // install PhantomJS with brew
phantom.exit();
var page = require('webpage').create();
page.open('http://example.com', function() {});
page.evaluate(function() { return document.title; });
@npotier
npotier / gitlab_stats.sh
Created December 10, 2014 22:05
Gitlab stats
# Dirty command line used to scan each gitlab repository and extract some stats
# in this case : foreach commit > 2014-01-01 get the number of commmits, number of line added, deleted grouped by users
rm /tmp/stats2014.csv; find /home/git/repositories -name .git -prune -o -name '*.git' -print | while read directory; do cd $directory; git log --after="2014-01-01" --format='%aN' |sort -u | while read name; do echo -en "Project\t$directory\t" >> /tmp/stats2014.csv; echo -en "Author\t$name\t" >> /tmp/stats2014.csv; git log --after="2014-01-01" --after="2014-01-01" --author="$name" --pretty=format:%ae | gawk -- '{ ++c; } END { printf "Number of commits\t%s\t",c; }' >> /tmp/stats2014.csv; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "Added lines\t%s\tRemoved lines\t%s\tTotal lines\t%s\n", add, subs, loc }' >> /tmp/stats2014.csv; done; done;
#!/usr/bin/python
import sys
import argparse
import re
import urllib, urllib2
import time
from collections import namedtuple
@konklone
konklone / ssl.rules
Last active May 19, 2024 18:02
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: