Skip to content

Instantly share code, notes, and snippets.

View odeke-em's full-sized avatar

Emmanuel T Odeke odeke-em

View GitHub Profile
@taviso
taviso / raceabrt.c
Created April 14, 2015 13:37
Race condition exploit for CVE-2015-1862
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <signal.h>
#include <err.h>
#include <string.h>
#include <alloca.h>
#include <limits.h>
#include <sys/inotify.h>
@non
non / answer.md
Last active February 28, 2025 11:46
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

// junkterm is a quick and dirty serial terminal.
package main
import (
"io"
"log"
"os"
"github.com/pkg/term"
"github.com/spf13/cobra"
@smblott-github
smblott-github / _drive
Created November 5, 2015 13:22
Rudimentary zsh completion for odeke-em/drive (a Google Drive utility)
#compdef drive drive-google
local cmnd desc
if [[ $CURRENT == 2 ]]
then
local -a options
drive |
grep '^ [a-z]' |
while read cmnd desc
do
@kylemcdonald
kylemcdonald / CameraImage.cpp
Created November 23, 2015 15:30
openFrameworks app for sending images to disk for processing, and reading text back from disk. Used for "NeuralTalk and Walk".
#include "ofMain.h"
#include "ofxTiming.h"
class ofApp : public ofBaseApp {
public:
ofVideoGrabber grabber;
DelayTimer delay;
ofTrueTypeFont font;
string description;
@RickCogley
RickCogley / Mac OS X Folder Action Upload Screenshot to Google Drive.sh
Last active September 6, 2024 10:11
Mac OS X Folder Action Upload Screenshot to Google Drive.sh
#!/bin/bash
# Author: Rick Cogley
# Updated: 27 Jan 2016
# Purpose: For use in a Mac OS X automator action, set to watch a screenshot folder.
# Assumes:
# GOPATH is set
# drive is installed (https://github.com/odeke-em/drive)
# there is a folder initialized with "drive init"
DRIVEINITPATH=$HOME/gdrive
@benhoyt
benhoyt / atomic_counter.py
Created August 3, 2016 13:12
An atomic, thread-safe incrementing counter for Python
"""An atomic, thread-safe incrementing counter."""
import threading
class AtomicCounter:
"""An atomic, thread-safe incrementing counter.
>>> counter = AtomicCounter()
>>> counter.increment()
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
@maruel
maruel / gist:544cb4266a1c844383c2972900e42ff9
Created August 2, 2017 23:43
Raw and brotli+gzip compressed files
maruel@periph-io /var/lib/docker/web/periph.io/www $ stat -c "%6s %n" $(find ./ -type f -name "*.html*" | sort)
69 ./apps/examples/index.html
55 ./apps/examples/index.html.br
85 ./apps/examples/index.html.gz
78 ./apps/index.html
59 ./apps/index.html.br
92 ./apps/index.html.gz
23291 ./device/apa102/index.html
5622 ./device/apa102/index.html.br
6559 ./device/apa102/index.html.gz

Building enduring value from the ICO boom

The ICO boom is precipitating a profound sea change in the availability of resources for blockchain Research and Development. For the 1st time, the sector has a entry level resources for developing a radical new set of tools for the global(solar system?) economy.

Our goal in 10 -15 years is pretty clear- Blockchain based systems should be the most useful and powerful liquidity rails for all kinds of assets. We have a lot of works to do fulfill the nascent potential of the blockchain space.

Here is a non-comprehensive list all the things we need to get to the moon.

Cryptographic Engineering

  • Safe, mature libraries for implementing complex protocols. NACL and libsodium aren’t going to cut it. Bitcoin-Core’s libsecp256k1 and Isis & Henry’s curve25519- Dalek are the way forward
  • Zero knowledge proof libraries need to be substantially matured. Libsnark and the forthcoming STARK work need mature, battle tested domain specific languages and compilers for securely