Skip to content

Instantly share code, notes, and snippets.

@KazWolfe
KazWolfe / yk-sc_reset.sh
Last active October 24, 2017 06:01
GPG Dynamic Smartcard Script
#!/bin/bash
# This script exists to solve a problem with GPG2's current smartcard system. Turns out there can only be
# one smart card (yubikey) attached to any public key at a time. This makes using your backup/spare keys
# very difficult. However, we can just automate the entire key registration procedure!
#
# Author: Kaz Wolfe (https://kazwolfe.io), 2017-10-23
# License: MIT
# INSTALL INSTRUCTIONS
@iosecure
iosecure / iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment.md
Last active April 4, 2024 23:50
iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

#include <stdio.h>
#include <stdint.h>
#define ITERATIONS 85
typedef struct {
uint64_t previous;
uint64_t current;
} numpair;
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
@DavidVaini
DavidVaini / round.go
Created April 9, 2014 19:58
Arggh Golang does not include a round function in the standard math package. So I wrote a quick one.
package main
import (
"log"
"math"
)
func Round(val float64, roundOn float64, places int ) (newVal float64) {
var round float64
pow := math.Pow(10, float64(places))
@skriticos
skriticos / QTreeView.1.py
Last active January 3, 2023 08:33
Simple QTreeView example
#! /usr/bin/env python3
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In this prototype/example a QTreeView is created. Then it's populated with
# three containers and all containers are populated with three rows, each
# containing three columns.
# Then the last container is expanded and the last row is selected.
# The container items are spanned through the all columns.
# Note: this requires > python-3.2
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import sys, os, pprint, time
@cheeaun
cheeaun / putonglasses.txt
Created September 14, 2012 08:57
put on glasses unicode
•_•)
( •_•)>⌐■-■
(⌐■_■)