Skip to content

Instantly share code, notes, and snippets.

View ppmathis's full-sized avatar

Pascal Mathis ppmathis

View GitHub Profile
@ppmathis
ppmathis / gist:3fbf3903c62aec569395
Last active August 29, 2015 14:03
keepass.io API Proposal #1
/* Basic concept */
/**
* Fluent interfaces like jQuery. meta(), string() all use the same principle:
*
* meta() = Return all metadata as a JSON object
* meta(key) = Return a specific key of the metadata
* meta(key, undefined) = Removes the specific key
* meta(key, value) = Set a specific key of the metadata
* meta(jsonObject) = Set multiple keys at once (or removes them, if value of a key is undefined)
*
@ppmathis
ppmathis / Library comparison
Created July 31, 2014 09:07
keepass.io - Issue #9
==== NeoXiD (Xubuntu 14.04) ====
nm build/Release/kpion.node | grep _ZTVN8CryptoPP18StringSinkTemplateISsEE
> U _ZTVN8CryptoPP18StringSinkTemplateISsEE
nm /usr/lib/libcrypto++.a | grep _ZTVN8CryptoPP18StringSinkTemplateISsEE
> 0000000000000000 V _ZTVN8CryptoPP18StringSinkTemplateISsEE
> U _ZTVN8CryptoPP18StringSinkTemplateISsEE
pmathis@troja:~/Projects/keepass.io$ nm -gC /usr/lib/libcrypto++.a | grep StringSinkTemplate
0000000000000000 W CryptoPP::StringSinkTemplate<std::string>::IsolatedInitialize(CryptoPP::NameValuePairs const&)
0000000000000000 W CryptoPP::StringSinkTemplate<std::string>::Put2(unsigned char const*, unsigned long, int, bool)
0000000000000000 W CryptoPP::StringSinkTemplate<std::string>::StringSinkTemplate(std::string&)
0000000000000000 W CryptoPP::StringSinkTemplate<std::string>::StringSinkTemplate(std::string&)
0000000000000000 W CryptoPP::StringSinkTemplate<std::string>::~StringSinkTemplate()
0000000000000000 W CryptoPP::StringSinkTemplate<std::string>::~StringSinkTemplate()
0000000000000000 W CryptoPP::StringSinkTemplate<std::string>::~StringSinkTemplate()
0000000000000020 W non-virtual thunk to CryptoPP::StringSinkTemplate<std::string>::~StringSinkTemplate()
0000000000000000 W non-virtual thunk to CryptoPP::StringSinkTemplate<std::string>::~StringSinkTemplate()
@ppmathis
ppmathis / bootstrap.yml
Last active August 29, 2015 14:21
Ansible Connection Bootstrapper
---
# First, we are going to check if the netcat binary is available.
# This is required to quickly check if the preferred SSH port is reachable.
- name: Connection Bootstrapper >> Check if 'nc' binary is available
delegate_to: 127.0.0.1
local_action: stat path=/usr/bin/nc
register: nc_binary_check
- name: Connection Bootstrapper >> Abort execution if 'nc' binary does not exist
fail:
@ppmathis
ppmathis / ADATA Superior Series S102 PRO 32 GB
Created November 22, 2015 12:12
CDM - USB Stick Benchmarks
-----------------------------------------------------------------------
CrystalDiskMark 5.0.3 x64 (C) 2007-2015 hiyohiyo
Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
Sequential Read (Q= 32,T= 1) : 41.895 MB/s
Sequential Write (Q= 32,T= 1) : 32.482 MB/s
Random Read 4KiB (Q= 32,T= 1) : 5.430 MB/s [ 1325.7 IOPS]
@ppmathis
ppmathis / app.coffee
Last active December 19, 2015 10:59
[sequelize] validation gets messed up when updating an model instance
# Modules
sequelize = require('sequelize')
# Connect to database
Sequelize = new sequelize('sequelize', 'sequelize', 'sequelize-test',
host: 'localhost'
port: '3306'
dialect: 'mysql'
syncOnAssociation: false
@ppmathis
ppmathis / instruction.md
Last active December 31, 2015 23:08
elementaryOS with kernel 3.12.5

uname -a
Linux smith 3.5.0-18-generic #29-Ubuntu SMP Thu Oct 25 07:26:14 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

  1. wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.5-trusty/linux-headers-3.12.5-031205_3.12.5-031205.201312120254_all.deb
  2. wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.5-trusty/linux-headers-3.12.5-031205-generic_3.12.5-031205.201312120254_amd64.deb
  3. wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.5-trusty/linux-image-3.12.5-031205-generic_3.12.5-031205.201312120254_amd64.deb
  4. dpkg -i linux-headers* linux-image*

uname -a
Linux smith 3.12.5-031205-generic #201312120254 SMP Thu Dec 12 07:55:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

projectname@0.0.0 /home/username/Development/projectname
├─┬ babel-plugin-transform-decorators-legacy@1.3.4
│ ├── babel-plugin-syntax-decorators@6.5.0
│ ├─┬ babel-runtime@6.5.0
│ │ └── core-js@1.2.6
│ └─┬ babel-template@6.5.0
│ ├─┬ babel-traverse@6.5.0
│ │ ├── globals@8.18.0
│ │ ├─┬ invariant@2.2.0
│ │ │ └── loose-envify@1.1.0
@ppmathis
ppmathis / v6ra-default-gateway.rsc
Last active May 25, 2016 20:43
IPv6 RA Default Gateway for Mikrotik devices
:local "v6ra-router" [:toid ([/ipv6 neighbor find where router]->0)]
:if ([:typeof $"v6ra-router"] = "nil") do={
:error "No IPv6 neighbor with router flag found, can not set default gateway!"
}
:local "v6ra-address" [/ipv6 neighbor get $"v6ra-router" address]
:local "v6ra-interface" [/ipv6 neighbor get $"v6ra-router" interface]
/ipv6 route set [find where comment="Default Gateway (RA)"] gateway="$(v6ra-address)%$(v6ra-interface)"
@ppmathis
ppmathis / 01-stacktrace.log
Created July 14, 2016 02:02
Proxmox: Maximum Callstack Size Exceeded
Uncaught RangeError: Maximum call stack size exceeded
[Symbol.split] @ (program):356
split @ (program):285
removeCls @ ext-all.js:formatted:17688
toggleInvalidCls @ ext-all.js:formatted:76607
toggleInvalidCls @ ext-all.js:formatted:77802
renderActiveError @ ext-all.js:formatted:76600
renderActiveError @ ext-all.js:formatted:77181
setActiveErrors @ ext-all.js:formatted:76510
markInvalid @ ext-all.js:formatted:77141