Skip to content

Instantly share code, notes, and snippets.

View maruno's full-sized avatar

Maruno Ulfdrengr maruno

View GitHub Profile
@maruno
maruno / abstract.tex
Created October 4, 2012 13:39
Documentatie manual ciphers OpenSSL
\begin{abstract}
Voor de module cryptografie werd gevraagd om een bestaande cryptografie-toepassing aan te passen.
Onze keuze is gegaan naar het aanpassen van OpenSSL, waarbij gevraagd werd om het mogelijk te maken
om een algoritme te kiezen in de client en enkele benchmarks uit te voeren. In dit document
beschrijven we onze vindingen en hoe we hier gekomen zijn.
\end{abstract}
@maruno
maruno / gist:4131348
Created November 22, 2012 14:07
Simtime timepoint to realtime
std::chrono::time_point<std::chrono::high_resolution_clock> deliveryRealTime = Clock::getInstance().getStartTime();
deliveryRealTime += (message->deliveryTime / config::globals::simulationSpeedMultiplier);
@maruno
maruno / string_ext.rb
Last active December 15, 2015 12:39 — forked from jcberthon/string_ext.rb
Ruby String to_boolean monkey patch with Dutch i18n
class String
def to_boolean
return true if self == true || self =~ (/(true|t|yes|y|1|ja)$/i)
return false if self == false || self.nil? || self.empty? || self =~ (/(false|f|no|n|0|nee)$/i)
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
end
@maruno
maruno / gist:5451607
Last active December 16, 2015 14:49
NSFetchedResultsController performFetch with affectedStores on iOS6
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")) {
//HACK iOS 6 does not retain correctly, causing a refcount of -1, creating a NSZombie
CFBridgingRetain(self.fetchedResultsController.fetchRequest.affectedStores);
}
[self.fetchedResultsController performFetch:&error];
@maruno
maruno / cf-uuid.py
Created March 9, 2015 16:52
CF UUID
#!/usr/bin/env python
import sys
import uuid
def create_cf_uuid(uuid_str=None):
"""
Go from 8-4-4-4-12 to 8-4-4-16
"""
if not uuid_str:
uuid_str = str(uuid.uuid4())
@maruno
maruno / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
pp_task_hdl : 3fff2158, prio:14, stack:512
pm_task_hdl : 3fff2b28, prio:1, stack:176
frc2_timer_task_hdl:3fff55e0, prio:12, stack:200
ESP-Open-SDK ver: 0.0.1 compiled @ Jan 31 2016 14:40:28
phy ver: 273, pp ver: 8.3
Connecting to network...
mode : sta(5c:cf:7f:12:13:75)
add if0
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 30916, room 16
tail 4
chksum 0x2b
load 0x3ffe8000, len 2168, room 4
tail 4
chksum 0x84
load 0x3ffe8880, len 4940, room 4
tail 8
@maruno
maruno / build.log
Last active May 18, 2016 20:31
Crosstool-NG xtensa-1.22.x GCC 5.2 compile
This file has been truncated, but you can view the full file.
[INFO ] Performing some trivial sanity checks
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] ==> Executing: 'mkdir' '-p' '/storage/tooling/crosstool-NG/bin/.build'
[DEBUG] ==> Executing: 'rm' '-f' '/storage/tooling/crosstool-NG/bin/.build/backtrace'
[DEBUG] ==> Executing: 'touch' '/storage/tooling/crosstool-NG/bin/.build/foo'
@maruno
maruno / .tmux.conf
Created November 7, 2016 10:00
Tmux conf with Vim mode and 256 colours
set -g terminal-overrides "xterm-256color"
set -g default-terminal "screen-256color"
set -sg escape-time 0
set-window-option -g mode-keys vi
set-window-option -g aggressive-resize on
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection