Skip to content

Instantly share code, notes, and snippets.

View kingbin's full-sized avatar
🎯
Focusing

kingbin

🎯
Focusing
View GitHub Profile
@kingbin
kingbin / gist:c6a1473d8c8ce2f70762bca4a4d2bf8c
Created November 15, 2019 19:51
Docker API exposed from Mac Docker Desktop w TLS
export FILENAME=server
openssl genrsa -out $FILENAME.key 2048
openssl req -new -key $FILENAME.key -x509 -days 3653 -out $FILENAME.crt
cat $FILENAME.key $FILENAME.crt >$FILENAME.pem
chmod 600 $FILENAME.key $FILENAME.pem
export FILENAME=client
openssl genrsa -out $FILENAME.key 2048
openssl req -new -key $FILENAME.key -x509 -days 3653 -out $FILENAME.crt
cat $FILENAME.key $FILENAME.crt >$FILENAME.pem
chmod 600 $FILENAME.key $FILENAME.pem

Keybase proof

I hereby claim:

  • I am kingbin on github.
  • I am kingbin (https://keybase.io/kingbin) on keybase.
  • I have a public key ASCnYtP-gLSh2UJHoD-2qxxA_KKt6n_gxr6SIZ-lxcy-kwo

To claim this, I am signing this object:

@kingbin
kingbin / gist:6efac2c171616be9974e7b1644e178ff
Created September 24, 2018 21:17
React-Native 0.55.4 w iOS 12 & XCode 10
GLog resolve w libfishhook dependency
```
$ cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../
$ cd node_modules/react-native/third-party/glog-0.3.4/ && ../../scripts/ios-configure-glog.sh && cd ../../../../
$ cp ~/Library/Developer/Xcode/DerivedData/XXX/Build/Products/Release-iphonesimulator/libfishhook.a ./node_modules/react-native/Libraries/WebSocket/
```
@kingbin
kingbin / file-svg-export.py
Created March 2, 2018 20:31 — forked from thorsummoner/file-svg-export.py
GIMP Plug-in for Simple SVG Exports
#!/usr/bin/env python
# GIMP Plug-in for Simple SVG Exports
# Copyright (C) 2016 by Dylan Grafmyre <thorsummoner@live.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
@kingbin
kingbin / docker_descendants.py
Created February 2, 2018 20:34 — forked from altaurog/docker_descendants.py
Python3 script to find descendants of one or more docker images
#!/usr/bin/python3
#
# usage: python3 docker_descendants.py <image_id> ...
import sys
from subprocess import check_output
def main(images):
image_ids = set(images)
@kingbin
kingbin / gist:a62d7684d803aae1de1dc7ffef79aa7a
Created January 18, 2018 17:32
IIS for SSL Perfect Forward Secrecy and TLS 1.2
# Copyright 2017, Alexander Hass
# http://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12
#
# Version 1.8
# - Windows 2016 powershell 5.1.14393.1532 requires 'else' statements in the same line after to the closing 'if' curly quote.
# Version 1.7
# - Windows Version compare failed. Get-CimInstance requires Windows 2012 or later.
# Version 1.6
# - OS version detection for cipher suites order.
# Version 1.5
@kingbin
kingbin / gist:54ee461d2f57d432ebd393af677ec01f
Created November 29, 2017 16:51
CodeSigning Identities
security find-identity -v -p codesigning
@kingbin
kingbin / gist:419e106b5905025e14d113efdea2519b
Created November 29, 2017 16:50
Capture iPhone traffic
rvictl -s UUID
rvictl -l
ifconfig -l
tcpdump -i rvi0 -w trace.pcap
ctrl x-c
rvictl -x UUID

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@kingbin
kingbin / GSEventEmitter.h
Created June 13, 2017 14:27 — forked from andybangs/GSEventEmitter.h
Example RCTEventEmitter Subclass
#import "RCTEventEmitter.h"
#import "RCTBridge.h"
@interface GSEventEmitter : RCTEventEmitter <RCTBridgeModule>
+ (BOOL)application:(UIApplication *)application didSightBeacon:(NSString *)beaconID;
+ (BOOL)application:(UIApplication *)application didDepartBeacon:(NSString *)beaconID;
@end