Skip to content

Instantly share code, notes, and snippets.

View jupp0r's full-sized avatar

Jupp Mueller jupp0r

  • Santa Barbara, CA, USA
View GitHub Profile
@jupp0r
jupp0r / Demo.cpp
Created March 7, 2017 10:20
C++ function returning an ES6 promise
#include <node.h>
#include "Test.h"
namespace demo {
using v8::FunctionCallbackInfo;
using v8::Isolate;
using v8::Local;
using v8::Object;
@jupp0r
jupp0r / load-gpg-agent-environment.el
Created December 18, 2015 10:09
Using gpg-agent with emacs under OS X
;; read gpg-agent environment
(defun read-env-line (line)
"read a env line and post to environment"
(let ((key-value-pair (split-string line "=" t)))
(setenv (car key-value-pair) (car (last key-value-pair))))
)
(defvar gpg-agent-info-file)
(setq gpg-agent-info-file (concat (getenv "HOME") "/.gpg-agent-info"))
(when
(file-exists-p gpg-agent-info-file)
@jupp0r
jupp0r / zionhikes.md
Last active July 22, 2018 01:34
Zion Hikes
@jupp0r
jupp0r / coro.cpp
Last active June 1, 2018 01:19
Minimal coroutines-ts generator
// compile with clang++ -g -std=c++17 -fcoroutines-ts coro.cpp
#include <experimental/coroutine>
#include <iostream>
struct generator {
struct promise_type {
int current_value;
auto initial_suspend() { return std::experimental::suspend_always{}; }
@jupp0r
jupp0r / exercise1.ipynb
Last active April 13, 2017 06:52
coursera_machine_learning_python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jupp0r
jupp0r / LogContext.h
Last active March 28, 2017 03:36
Structured logging adapter for C++
#pragma once
#include <vector>
#include <string>
#include <iostream>
class LogContext
{
public:
template <typename T>
@jupp0r
jupp0r / unique_iterator.rs
Last active September 7, 2016 08:08
Unique Iterator in Rust
use std::collections::HashSet;
use std::option::Option;
use std::hash::{SipHasher, Hash, Hasher};
struct UniqueIterator<I> {
iter: I,
seen_items: HashSet<u64>,
}
fn hash_item<T>(item: &T) -> u64

Keybase proof

I hereby claim:

  • I am jupp0r on github.
  • I am jupp0r (https://keybase.io/jupp0r) on keybase.
  • I have a public key whose fingerprint is 059A 2DAE 89C9 6FFF F69C 55ED CA42 D5D2 A815 21E2

To claim this, I am signing this object: