Skip to content

Instantly share code, notes, and snippets.

View stefan2904's full-sized avatar
🚲
¯\_(ツ)_/¯

Stefan stefan2904

🚲
¯\_(ツ)_/¯
View GitHub Profile
@twu
twu / Scratchpad
Created February 27, 2015 09:32
A more "sophisticated" approach to using the TUGBox.
#!/usr/bin/env python
import urllib2
import json
if __name__ == '__main__':
# Computer Science (557), BSc. (140), Current "Studienjahr" (1034)
# .json -> simple json
# .js -> jsonp
# webcal:// ... /exams.ical -> iCalendar
url = 'http://tugbox.herokuapp.com/tug/curriculum/557,140,1034/exams.ical'
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active April 5, 2025 04:55
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

clear all;
close all;
clc;
load data_logreg.mat;
isOctave = exist('OCTAVE_VERSION', 'builtin') ~= 0;
eta = 1;
options.degrees = [1 2 5 15];
anonymous
anonymous / blackbox
Created May 18, 2015 00:16
151 out = ""
152 shift = 0
153 for j in xrange(0,len(ans),4):
154 try:
155 i = j
156 out += inputs[(inputs.index(ans[i])-inputs.index(key[0])-shift)%len(inputs)]
157 shift += inputs.index(ans[i])+1
158 i = j+1
159 out += inputs[(inputs.index(ans[i])-inputs.index(key[0])-shift)%len(inputs)]
160 shift += inputs.index(ans[i])+1
anonymous
anonymous / blackbox
Created May 18, 2015 00:23
import socket
import random
host = "blackbox_ced7f267475a0299446fa86c26d77161.quals.shallweplayaga.me"
port = 18324
inputs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ "
s = socket.socket()
s.connect((host, port))

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

#!/bin/bash
#updated ffmpeg progress indicator
#by Rupert Plumridge
#for updates visit www.prupert.co.uk
#Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales Licence
# Based on the ffmpegprogress bar from: http://handybashscripts.blogspot.com/2011/01/ffmpeg-with-progress-bar-re-work.html
# which was based on my initital progress script - circle of life and all that ;)
# version 2.0
# 07.04.2011
# now uses apparently better progress detection, based on duration of overall video and progress along the conversion
@parmentf
parmentf / GitCommitEmoji.md
Last active May 12, 2025 06:48
Git Commit message Emoji
@sprig
sprig / setup-emacs-fonts.el
Created March 11, 2016 22:30
Config to set up nice fonts in emacs
(defun kk/setup-fonts (&rest args)
(interactive)
(set-face-font 'default "Source Code Pro for Powerline-11")
(set-fontset-font t 'hebrew (font-spec :name "Courier New-11"))
)
(advice-add 'server-create-window-system-frame :after 'kk/setup-fonts)
(advice-add 'server-create-tty-frame :after 'kk/setup-fonts)
(unless (daemonp) (kk/setup-fonts))
@alphapapa
alphapapa / helm-org-tag-completion.el
Last active December 21, 2022 15:45
Complete multiple org-mode tags with helm
;;;;;; Fix Helm org tag completion
;; From Anders Johansson <https://groups.google.com/d/msg/emacs-helm/tA6cn6TUdRY/G1S3TIdzBwAJ>
;; This works great! He posted it on 3 Mar 2016, on a thread that was
;; started in Oct 2013. He also posted this message on 2 Apr 2014,
;; maybe an earlier attempt at a solution:
;; <http://article.gmane.org/gmane.emacs.orgmode/84495> I've just
;; tidied it up a bit and adjusted the prompt.
(add-to-list 'helm-completing-read-handlers-alist '(org-capture . aj/org-completing-read-tags))