Skip to content

Instantly share code, notes, and snippets.

View mrmoneyc's full-sized avatar

Chun-Ping (Jeremy) Chang mrmoneyc

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mrmoneyc on github.
  • I am mrmoneyc (https://keybase.io/mrmoneyc) on keybase.
  • I have a public key ASA9Qq-dk4JV12yVD9nxJY4enWhKl1Dgx65SL4VeqXGYVwo

To claim this, I am signing this object:

Gem::Version.new('0.3.2') < Gem::Version.new('0.10.1')
=> true
Gem::Version.new('0.3.0') == Gem::Version.new('0.3')
=> true
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import argparse
import boto3
# Parsing paramateres
parser = argparse.ArgumentParser(description='Change WAF Rule Action')
parser.add_argument('--web-acl-id', dest='web_acl_id', type=str, required=True, help='WAF Web ACL ID')
@mrmoneyc
mrmoneyc / prepare-commit-msg
Last active February 17, 2016 02:48 — forked from aemonge/prepare-commit-msg
Angular Commit Message Conventions git hook, so you got your commit prepared to with the messages they expect ;)
#!/bin/bash
# Angular Commit Message Conventions git hook
firstLine=`head -2 $1 | tail -1`
if [[ $firstLine == \#* ]]; then # Testing that the file starts with a comment, not yet a real commit ;)
echo '<type>(<scope/component>): <subject>' > .prepare-commit-msg-temp
echo '' >> .prepare-commit-msg-temp
echo '<body>' >> .prepare-commit-msg-temp
echo '' >> .prepare-commit-msg-temp
echo '<footer>' >> .prepare-commit-msg-temp
// Schnorr Signature
// Ref. Textbook: Nigel Smart - Cryptography An Introduction 3e, pp. 228-229
package main
import (
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"fmt"
@mrmoneyc
mrmoneyc / hack.sh
Created February 15, 2014 17:33 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mrmoneyc
mrmoneyc / hack.sh
Created December 8, 2013 06:37 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
// happy xmas
var npm = require("./npm.js")
, log = require("npmlog")
module.exports = function (args, cb) {
var s = process.platform === "win32" ? " *" : " \u2605"
, f = "\uFF0F"
, b = "\uFF3C"
, x = process.platform === "win32" ? " " : ""
, o = [ "\u0069" , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020"
#------------------------------------------------------------
#
# tmux configure file
#
# Maintainer: Chun-Ping Chang (mrmoneyc) <moneyc.net -AT- gmail.com>
#
# Last modified: 2011-10-24 21:17:19
#
#------------------------------------------------------------
@mrmoneyc
mrmoneyc / httpd.conf
Created August 14, 2011 06:17
httpd.conf
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php index.phtml
</IfModule>
<IfModule php5_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>