Skip to content

Instantly share code, notes, and snippets.

View FredericJacobs's full-sized avatar
🔐
Encrypt the Planet 🌍

Frederic Jacobs FredericJacobs

🔐
Encrypt the Planet 🌍
View GitHub Profile
@BastienClement
BastienClement / gist:2412198
Created April 18, 2012 09:04
Authenticator token generation
/// <summary>
/// 10^0..10^8 (NumDigits used in the HOTP)
/// </summary>
private static readonly int[] DigitsPower = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000};
private static int DynamicTruncate(byte[] hash)
{
int offset = hash[hash.Length - 1] & 15;
return ((hash[offset] & 127) << 24) + ((hash[offset + 1] & 255) << 16) + ((hash[offset + 2] & 255) << 8) +
@antoinealb
antoinealb / isa_watcher.py
Last active December 11, 2015 05:19
A simple script to watch for changes on IS academia. Best launched by crontab.
#!/usr/bin/env python2
import socket, ssl, re, hashlib
from datetime import date
# PDF URL on Is-Academia
URL = "/imoniteur_ISAP/!ETURELEVENOTES.pdf?ww_i_inscrblocFiltrage=XXXXXXXXXXXXX&ww_i_unite=10100&ww_i_inscription=XXX"
# GASPAR username
USERNAME = ""
@Geal
Geal / gist:8228049
Last active January 2, 2016 01:09
rough threat model for group chat
# Threat model
## Attacker categories
### Security adversary
Wants to read messages he is not supposed to.
able to control communication channels and read/modify packets
### Consensus adversary
@taoeffect
taoeffect / gist:8855230
Created February 7, 2014 00:20
DNSChain + DNSCrypt! :-D
dnscrypt-proxy --local-address=127.0.0.1:53 --resolver-address=23.226.227.93:443 --provider-name=2.dnscrypt-cert.okturtles.com --provider-key=1D85:3953:E34F:AFD0:05F9:4C6F:D1CC:E635:D411:9904:0D48:D19A:5D35:0B6A:7C81:73CB
@heathermiller
heathermiller / gist:9158658
Last active December 11, 2018 06:35
A more beautiful Terminal experience.

A nicer Terminal experience.

Just add the following to your bash profile.

export PS1='\[\033[38;5;202;48;5;0m\]⏣ \[\033[38;5;134;48;5;0m\]\w \[\033[38;5;112;48;5;0m\]`git branch 2> /dev/null | grep -e ^* | sed -E  s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[00m\]'

(The green bit there is the current branch you're on if you're in a directory that has a git repository within it)

Important organizational announcement Due to feedback from several people who wish to contribute, this project is being moved to it's own repository. The master copy is now at SalusaSecondus/CryptoGotchas. This will let us more easily take PRs/Issues and track contributions.

@eternalstorms
eternalstorms / Apple Evangelists.txt
Created June 12, 2013 09:07
Apple Evangelists (WWDC 2013)
UI- and App Frameworks Evangelist - Jake Behrens, behrens@apple.com, twitter: @Behrens
- What's new in Cocoa
- Accessibility in iOS
- Building User Interfaces for iOS 7
- Getting Started with UIKit Dynamics
- What's new in Cocoa Touch
- What's New With Multitasking
- Best Practices for Cocoa Animation
- Improving Power Efficiency with App Nap
- Introducing Text Kit
@adulau
adulau / Journalism.md
Last active September 21, 2021 19:25
A joint work between Quinn Norton and Alexandre Dulaunoy on how to interact with journalists.

A joint work between Quinn Norton and Alexandre Dulaunoy on how to interact with journalists. The presentation was given at OHM2013.

Talking to the media

You've reached out, or they've reached out to you. It could be everything from a formal request to PR to someone who sat down beside you in a bar. It could be a 30 second breaking news piece, or a book 10 years in the making. Knowing a little bit about the media can make the whole exchange more fruitful and useful not only for you and the journalist, but a public that hasn't had a lot of good information about our world.

Inform yourself

@defeo
defeo / sidh-explained.md
Last active November 7, 2021 09:52
Key exchange in supersingular space-time

Key exchange in supersingular space-time

I was asked to vulgarize SIDH. Here is a very poor attempt!

Alice and Bob are space travelers. They both own a spaceship capable of traveling the galaxy through supersingular space-time at incredible speeds. They want to discuss a top-secret space mission, but they are afraid that the evil Zkptrx will spy upon their

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.