Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am cbluth on github.
  • I am cbluth (https://keybase.io/cbluth) on keybase.
  • I have a public key ASDwvOBWnXsCWcx8ycLQX64HslTy-ZBGhgKSQpNlp1JO4go

To claim this, I am signing this object:

@cbluth
cbluth / Nginx-blackhole
Created May 12, 2017 18:29 — forked from ftischhauser/Nginx-blackhole
Nginx as a blackhole server for PAC based ad blockers
server {
# Listen on port 9123. Change to your liking and remove 'deferred' if unsupported on your OS.
listen [::]:9123 ipv6only=off deferred;
# We don't need to log these proxy requests.
access_log off;
# Let browsers cache our responses.
expires max;
location / {
# Return an empty gif for all requests.
empty_gif;
### Keybase proof
I hereby claim:
* I am cbluth on github.
* I am cbluth (https://keybase.io/cbluth) on keybase.
* I have a public key ASBQKpLQec3gGBYallby18CdJr4of_c1HmQ6-Qst3weKtgo
To claim this, I am signing this object:
@cbluth
cbluth / bash_ipfs_memory_logger.sh
Last active September 21, 2017 03:55 — forked from leerspace/bash_ipfs_memory_logger.sh
bash script for logging ipfs daemon memory utilization, repo size, and peer count
#/bin/bash
while sleep 1; do
# get process id for ipfs daemon
output=`ps aux | grep "ipfs daemon" | grep -v grep`
set -- $output
pid=$2
# get timestamp
timestamp=$(date +%s)
# get process memory usage in kilobytes
@cbluth
cbluth / ipfs.yml
Created September 29, 2017 23:14 — forked from kordless/ipfs.yml
Deploy IPFS on Kubernetes
apiVersion: v1
kind: Service
metadata:
name: ipfs
spec:
type: NodePort
ports:
- name: ipfs
port: 8080
targetPort: 8080
@cbluth
cbluth / SMBDIS.ASM
Created October 18, 2017 16:46 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: cluster-autoscaler
namespace: kube-system
labels:
app: cluster-autoscaler
spec:
replicas: 2
selector:
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
application: web
name: web
role: application
name: web
@cbluth
cbluth / stream_to_youtube.sh
Last active November 3, 2017 03:37 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@cbluth
cbluth / arch-linux-install
Last active December 5, 2017 19:14 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap