Skip to content

Instantly share code, notes, and snippets.

View anarcher's full-sized avatar
😞

myoung-su,shin anarcher

😞
View GitHub Profile
@anarcher
anarcher / README.md
Last active October 16, 2019 09:35 — forked from skwashd/README.md
Copy AWS SSM Parameter Store Path

This Python (3.6+) script is for migrating Amazon AWS System Manager (SSM) Parameter Store keys from one path to another.

Quick Start

To install the script do the following:

  • Configure your AWS credentials
  • Grab the code from this gist
  • Make it executable (chmod +x /path/to/copy-ssm-ps-path.py)
  • pip install boto3 (if you don't have it installed already)
@anarcher
anarcher / certgen.rb
Last active August 29, 2015 14:23 — forked from sheerun/certgen.rb
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@anarcher
anarcher / multimap.scala
Created May 13, 2012 06:34 — forked from nephilim/scala-competition-spec.scala
ScalaTest Spec for 20120513 Lasdan Competition
import collection.mutable.Map
class MultiMap[K,V] {
var _internal = Map[K,List[V]]()
def apply(key : K) = _internal(key)
def put(key:K,value:V) = update(key,value)
def update(key: K,value : V) = if (_internal.contains(key)) {
_internal(key) = _internal(key) ::: value :: Nil
} else {
_internal(key) = value :: Nil
@anarcher
anarcher / memcached.py
Created February 18, 2011 06:59 — forked from mmalone/gist:299905
django cache class from mike's cache class
"Memcached cache backend"
from django.core.cache.backends import memcached
from django.utils.encoding import smart_unicode, smart_str
MIN_COMPRESS_LEN = 150000
class CacheClass(memcached.CacheClass):
def add(self, key, value, timeout=None, min_compress_len=MIN_COMPRESS_LEN):
if isinstance(value, unicode):