Skip to content

Instantly share code, notes, and snippets.

View ppmathis's full-sized avatar

Pascal Mathis ppmathis

View GitHub Profile
#!/bin/bash
MYSQL_HOSTNAME="42.42.42.42"
MYSQL_DATABASE="pdns"
MYSQL_USERNAME="pdns"
MYSQL_PASSWORD="pdns"
CERT_FILE_USER="root"
CERT_FILE_GROUP="root"
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 / portknocker.ps1
Last active March 15, 2024 21:13
PowerShell Portknocker
# Remove old readonly constants from session
Remove-Variable -Name KNOCK_DESTINATION -Force -ErrorAction SilentlyContinue
Remove-Variable -Name KNOCK_VALID_TYPES -Force -ErrorAction SilentlyContinue
Remove-Variable -Name KNOCK_PORTS -Force -ErrorAction SilentlyContinue
Remove-Variable -Name KNOCK_EXE_TARGET -Force -ErrorAction SilentlyContinue
# === SCRIPT CONFIGURATION ===
Set-Variable KNOCK_DESTINATION -Option ReadOnly -Value "1.2.3.4"
Set-Variable KNOCK_VALID_TYPES -Option ReadOnly -Value ("TCP", "UDP")
Set-Variable KNOCK_PORTS -Option ReadOnly -Value ((1, "TCP"), (2, "TCP"), (3, "UDP"), (4, "UDP"))
@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 / 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:
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 / 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
@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)
*

S5

S5 is an abbreviation for Snap Serv Server Stack Script. Basically it is meant for setting up a fresh Debian Wheezy x86/x64 system. You can read everything it does in config.sh, which is an example config. Remember to adjust to example configuration to some sane values.

Usage

  1. Connect to your fresh server

  2. Adjust network configuration if necessary

  3. Download s5.sh and config.sh into /root:

@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