Skip to content

Instantly share code, notes, and snippets.

Claudius Coenen ccoenen

Block or report user

Report or block ccoenen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ccoenen
ccoenen / node-scrypt-to-scrypt-async.js
Last active Sep 16, 2018
I am trying to read "old" node-scrypt hashes with scrypt-async. So far with little success. This script needs `scrypt` and `scrypt-async` installed via `npm`
View node-scrypt-to-scrypt-async.js
/* ATTEMPT TO PARSE A node-scrypt STRING CORRECTLY FOR USE WITH scrypt-async */
var scrypt = require('scrypt-async');
var scryptOld = require('scrypt');
var crypto = require('crypto');
// Format as seen in node-scrypt, written by Barry Steyn. Scrypt by Colin Percival.
// https://github.com/barrysteyn/node-scrypt/blob/master/scrypt/scrypt-1.2.0/keyderivation.c#L60-L77 and
// https://security.stackexchange.com/a/91050/50616
// scrypt paper: https://www.tarsnap.com/scrypt/scrypt.pdf (not helpful for this :-( )
@ccoenen
ccoenen / anchor-test.md
Last active Apr 2, 2018
Test of Hackmd Issue #795
View anchor-test.md

Summary Heading

test

@ccoenen
ccoenen / Deutsche Webhosting Anbieter.md
Last active Apr 22, 2019
Nach dem Verkauf von HostEurope an GoDaddy bin ich auf der Suche nach einem deutschen Webhoster für ein kleines privates Paket.
View Deutsche Webhosting Anbieter.md
View 002.rb
#!/usr/bin/env ruby
# moves files containing 002 on line 9 to a different directory.
require 'fileutils'
FileUtils.mkdir_p('with002')
FileUtils.mkdir_p('no002')
def contains_zero_zero_two?(filename)
@ccoenen
ccoenen / monitoring.sh
Created Mar 3, 2015
Simple Monitoring with statsd, shell and netcat
View monitoring.sh
PREFIX=any.prefix.will.do
STATSD_HOSTNAME=your.server.name
STATSD_PORT=8125
while true; do
echo "$PREFIX.systemload1:`cut -f1 -d " " /proc/loadavg`|g" | ./nc -u -q 0 $STATSD_HOSTNAME $STATSD_PORT
cat /proc/stat | grep "cpu " | \
while read -r cpu user nice system idle iowait irq softirq steal guest guestnice
do
@ccoenen
ccoenen / 0-readme.md
Last active Aug 29, 2015
Monty Hall Problem Simulator
View 0-readme.md

The Monty Hall Problem is a probability puzzle.

When i read [this article about Marilyn vos Savant][1], my initial reaction was "that can't be right". I continued to read the comments, the [wikipedia page][2] and then started a table to see if this was indeed the case. Being a programmer, i then started a simulation.

This is what it turned out to be.

The concise explanation is: The door's chance does not change. This

View keybase.md

Keybase proof

I hereby claim:

  • I am ccoenen on github.
  • I am amenthes (https://keybase.io/amenthes) on keybase.
  • I have a public key whose fingerprint is AC0E EF09 8692 337D C2DF 08AC 1643 AC59 BD9B 1572

To claim this, I am signing this object:

@ccoenen
ccoenen / upnp2mrtg.sh
Last active Aug 29, 2015
upnp2mrtg fork
View upnp2mrtg.sh
#!/bin/bash
#
# MINOR CHANGES IN THIS VERSION, NOT ACTUALLY THE ORIGINAL RELEASE!
#
# upnp2mrtg - Monitoring AVM Fritz!Box With MRTG
# This versions have been reported as working: 3030, 5050, 7050, 7141 and 7170
#
# Copyright (C) 2005 Michael Tomschitz <michael.tomschitz@ANetzB.de>
#
# This program is free software; you can redistribute it and/or modify
@ccoenen
ccoenen / .gitconfig
Created May 14, 2014
Git Configuration (Windows)
View .gitconfig
[user]
name = My Awesome name
[core]
excludesfile = c:/Users/....../.gitignore_global
editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession -noPlugin
autocrlf = false
[push]
default = simple
View serve.py
#!/usr/bin/env python
import http.server
class MyHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_my_headers()
http.server.SimpleHTTPRequestHandler.end_headers(self)
def send_my_headers(self):
self.send_header("Cache-Control", "no-cache, no-store, must-revalidate")
You can’t perform that action at this time.