Skip to content

Instantly share code, notes, and snippets.

View ralfr's full-sized avatar

Ralf Rottmann ralfr

  • https://rv.do
  • Germany, Ruhr-Area
  • 11:36 (UTC -12:00)
View GitHub Profile
@ralfr
ralfr / README.md
Created January 15, 2017 19:22 — forked from pdanford/README.md
Applescript to launch iTerm2 Version 3+ from OS X Finder via keyboard shortcut or Toolbar

Description

Based on info from http://peterdowns.com/posts/open-iterm-finder-service.html but with modified behavior and fixed to work with iTerm2 version 3 or later. It will not work with older versions of iTerm. The modified behavior is to open a new terminal window for each invocation instead of reusing an already open window. Update - The original author released a build script for the newer iTerm2 versions at https://github.com/peterldowns/iterm2-finder-tools that keeps the original behavior of reusing an open iTerm2 window.

To open iTerm2 at selected folder with keyboard shortcut

  1. Run Automator, select a new Service
  2. Select Utilities -> Run AppleScript
  3. Service receives selected 'folders' in 'finder.app'
  4. Paste script:
@ralfr
ralfr / iota_zmq.js
Created January 11, 2018 13:55
IOTA ZeroMQ Snippet
const zmq = require('zeromq')
const config = require('./config')
var sock = zmq.socket('sub')
sock.connect('tcp://' + config.zmq_url)
sock.subscribe('')
sock.on('message', function(topic) {
@ralfr
ralfr / VPNConfigurationProfiles.mobileconfig
Created November 11, 2019 22:46 — forked from thomaswitt/VPNConfigurationProfiles.mobileconfig
An OnDemand VPN iOS profile for iPad and iPhone that automatically connects you to different VPNs (e.g. Meraki, FRITZ!Box and Streisand) | Blog-Entry: https://thomas-witt.com/auto-connect-your-ios-device-to-a-vpn-when-joining-an-unknown-wifi-d1df8100c4ba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<!-- Home: Manual -->
<dict>
<key>UserDefinedName</key>
@ralfr
ralfr / deployment.template.json
Created March 11, 2019 11:28
Azure IoT Edge Deployment Manifest
{
"$schema-template": "1.0.0",
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"schemaVersion": "1.0",
"runtime": {
"type": "docker",
"settings": {
"minDockerVersion": "v1.25",
@ralfr
ralfr / ubn_16_04_open_file_limits.sh
Last active April 29, 2018 14:46
Ubuntu 16.04 change open file limits
# Ubuntu 16.04
# Show max. open files for system
cat /proc/sys/fs/file-max
nano /etc/sysctl.conf
# Add the following line:
fs.file-max = 200000
# Persist changes
sysctl -p
@ralfr
ralfr / iota-kyc-reclaim-addresses.txt
Created April 23, 2018 12:25
IOTA KYC Reclaim Addresses
UVVOCC9WULVWJWJUVLCCYUWDXYNYJVQETHZRTITIJQGWOCEXSVXNPQNBLUBEXIYVNJNUDRVPAHXDATMAC
SBAHCXSSZWBATKMHXTQSOEARPDUHZGNMPPSEKKXVYRQPTQTOTDVCDMTSPZAJPEBXQJUCQQJKHEGLTMOPU
UHPHRPVEGPVCUJMUJLIZFIESWNKOTZAARAQLCRJBFEFSKRUVDNIHODCXQCFWLWOKLFU9VFXWFQXDS9B9D
TBGKN9WIHQMDHESLWF9DPNPTAQXHJCHMVHTUIWEWOIUJKCFCACQOFUIEXLNOZHCAKSTPNGOGYBW9CMKXO
9YWHIEJKIXVXAKIMEFW9KOVAUORICIERY9CKVYAJFVG9KXOUYZWGOJOKBPUJ9LLTNLDIZGUKEYEQMPXDO
HSZUVEBWREZDICTQGSQOZXXL9XCMYEMUQMCCSYHVPIAAJVWMRHOLRELBZOTSHUVOLBJRGFPRTZSVQONVM
TNFDHZJBMHTMGTFGEKTLVZMUKXVMTJBWTOTNCKQU9XEHPVUHP9LKEZSGUOWHKZALX9UPAPMZLPNPGDTMX
GICWLBBOAZRVOSDNYRRDECXFDQVEDSHPUGQWMQIIGBPDJSJWCDBBKDYWBXWXYGHIFLKZLZ9PRBROYWMOA
SHGXEFEPVCBWU99ZIQQZEYKGZDYKCNYGKNGXCBGZLQD9WFDKVPLILRVYELOZURRWIDEBDI9KMDAWBWFTL
FFLNHVYSAHCMFQYUVEUDERVNABZQACTWUVNMIKLQLFYANA9WVIFTLNJNACOUZSFJUNVJCQONMAO9ZSUYW
@ralfr
ralfr / Key-Reuse-Query.aql
Created February 25, 2018 13:13
Key Reuse Query AQL / Tangle
FOR tx IN txCollection
FILTER tx.address == 'ICKPPAYKLMJKCESXQNAYP9EKHHDNIXULDAZERMICWXKKDWJGWTETEKAOQTNZCEVGFLAQIXAC9ULXEU9BC' AND tx.value < 0
SORT tx.bundle
LIMIT 1000
RETURN {
value: tx.value,
bundle: tx.bundle,
sig: tx.signatureMessageFragment,
hash: tx._key
}
@ralfr
ralfr / iota_snapshot_verification.sh
Last active January 28, 2018 17:22
IOTA January 2018 Snapshot Verification
cd /home/iota/node/ixi
git clone https://github.com/iotaledger/Snapshot.ixi Snapshot
cd Snapshot
wget https://gist.githubusercontent.com/th0br0/8b92cfe79b89979c67efdc418ff55860/raw/08fd7246809c9d825a3ef6f9f6ba1292f652527e/20180128-validation.js
# Optionally correct port in line 3 of 20180128-validation.js
npm i request
systemctl restart iota
node 20180128-validation.js
# Add the output here: https://github.com/iotaledger/iri/pull/512
@ralfr
ralfr / hashes_for_single_bundle.js
Created December 15, 2017 14:20
Hashes for Single Bundle (IOTA)
[ { hash: 'BQMJTUAWAA9ZWDUZSVYUTWAPJDBWKGPZHNRVBJAODU9JRXF9CHUZA9JQXDAGXOVWSEJVQPAVCPUVA9999',
signatureMessageFragment: 'FUYQXHUIFNULLCSZCWRKATFEMKPPWXIMCLYGALFWAUGPCUAFHKMNBYDHXBZVDMO9TELXEAPOHOYDFIOKA9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCx1kKsNXx9QM0Bzsxt2mJbQvtV1qeBt7FmTs4Z4x3nxXol6nNHdnejvnYhWdPeRbm+6tVuZ16jR3t1Ab0VB/0c4Zh4MNlnCDIL9Bp0h4A5x+zB9XVDVgS6D+ePRqsr7a6O8CsXNLkO8bV6qs0T7jRgf6FI8+wd4cdqgGZ3q/DuQJSA9swH8Ca1OK9w7QJFiruKFdOxBdBbhnglLB+T8aYHjumwLKTHsUB+0zMTxCwM62bnnD50O7/HRRGzOc+E0EK5VW6GwlJ/Ly6a7u7A1jHniu3j5tnpTEaj84ZsEZc1l9WXmF7Fr1MzvFnUyQnsFFjj6xZWjJcJeW5I0QNWZInTrDwfZYMiKZdRmSc1G2S+jQV2N5L5aK4J7zn03rdDBKVNPVWp8YrCkzo/l8D8r38NlHFwU1/LQydSRBrWzuE6gVQ7F1Hx0f8x0D5n36pHHhNqQffCViwiXWvBVQyGh7qFx3ANopWY3VNDg/M8Ke5IAwoM+eFAgFq3LdFj6yKrIwxHSfykge6xmc2SxDze2dpOTeKFTfC2uVGgBCp53Jv3SdjXKNzZRax7rcU1pj3li5xkI8ywqlyZmGx+xDxfNqiQXuud6XEIPRWfTJaCmHnx2+ikRdFq+dxj6QfrM0ph/FOF3QfBV1GEgdJKR+m9plI7vwhwJ4NnoEGDo0lTyyuZjQ== ralf@rottmann.net