Skip to content

Instantly share code, notes, and snippets.

View qrtt1's full-sized avatar
💭
work from home

Ching Yi, Chan qrtt1

💭
work from home
View GitHub Profile
@qrtt1
qrtt1 / install.md
Created June 1, 2017 16:23 — forked from hlb/Brewfile
clean install

System Preferences

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12

# Set a blazingly fast keyboard repeat rate
@qrtt1
qrtt1 / gist:0600220db1ed1720678b
Created February 27, 2016 14:40 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@qrtt1
qrtt1 / stream_to_youtube.sh
Created February 27, 2016 14:28 — 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
  1. General Background and Overview
@qrtt1
qrtt1 / punch.py
Created October 5, 2013 12:56 — forked from koenbollen/punch.py
#!/usr/bin/env python
#
# Proof of Concept: UDP Hole Punching
# Two client connect to a server and get redirected to each other.
#
# This is the client.
#
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
#
#!/bin/sh
### functions
f() { echo "Failed."; exit; }
setup_net()
{
echo "Configuring network"
while :; do