Skip to content

Instantly share code, notes, and snippets.

View minhoryang's full-sized avatar
😍
Happy Today!

Minho Ryang minhoryang

😍
Happy Today!
View GitHub Profile
#!/usr/bin/python
# SPDX-License-Identifier: MIT
import sys,json,base64,binascii
with open(sys.argv[1]) as fp:
pkey=json.load(fp)
def enc(data):
missing_padding = 4 - len(data) % 4
if missing_padding:
#!/bin/bash
# Excerpts from https://enterprise.travis-ci.com/install/worker
#
populate_images() {
DOCKER_CMD="docker -H tcp://0.0.0.0:2375"
# pick the languages you are interested in
langs='android erlang go haskell jvm node-js perl php python ruby'
declare -a lang_mappings=('clojure:jvm' 'scala:jvm' 'groovy:jvm' 'java:jvm' 'elixir:erlang' 'node_js:node-js')
from sre_parse import Pattern, SubPattern, parse as sre_parse
from sre_compile import compile as sre_compile
from sre_constants import BRANCH, SUBPATTERN
class Scanner(object):
def __init__(self, tokens, flags=0):
subpatterns = []
pat = Pattern()
@voduytuan
voduytuan / docker-compose.yml
Created October 6, 2015 09:23
Private docker registry compose
dockerauth:
image: cesanta/docker_auth
ports:
- "5001:5001"
volumes:
- ./auth_server/config:/config:ro
- ./auth_server/log:/logs
- ./certs:/certs
command: /config/auth_config.yml
restart: always
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 15, 2025 05:09
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@yunazuno
yunazuno / dns64.py
Created September 2, 2015 05:29
A DNS64 resolver with AAAA filter-like behavior (similar to the Internet Shareing on OSX El Capitan)
#!/usr/bin/env python2
from twisted.internet import reactor
from twisted.names import client, dns, server
import ipaddr
import socket
class SixFourResolver(client.Resolver):
def __init__(
self,
@jmoody
jmoody / trace.md
Created September 1, 2015 08:11
carthage bootstrap failing on MacOS AlamoFire
2015-09-01 09:58:00.085 xcodebuild[26704:320561] stream error: stream error at offset 8: unsupported version number ('1.04')
=== BUILD TARGET Alamofire OSX OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
    cd /Users/moody/git/biketag/app/Carthage/Checkouts/Alamofire
    /Xcode/6.4/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -target x86_64-apple-macosx10.9 -incremental -module-name Alamofire -O -sdk /Xcode/6.4/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
Developer/SDKs/MacOSX10.10.sdk -g -module-cache-path /Users/moody/Library/Developer/Xcode/DerivedData/ModuleCache -Xfrontend -serialize-debugging-options -application-extension -I /Users/moody/Library/Developer/Xcode/DerivedData/Alamofir
@voxxit
voxxit / hashicorp.consul.server.plist
Created August 7, 2015 22:01
LaunchAgent for Consul & Consul UI
<?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>KeepAlive</key>
<true/>
<key>Label</key>
<string>hashicorp.consul.server</string>
<key>ProgramArguments</key>
<array>
@hwine
hwine / decode_hosts.py
Created July 31, 2015 02:48
decode hashed known_hosts
#!/usr/bin/env python
"""
Find host - decode hashed known_hosts files
Using an unhashed known_hosts file as reference, compare by host
key.
"""
import logging