Skip to content

Instantly share code, notes, and snippets.

@samisalkosuo
samisalkosuo / lsp.bash
Last active November 26, 2015 13:04
LS files in dir with full path. http://rnd-dev.com/ls-files-with-full-path/
#!/usr/bin/env bash
if [[ "$1" != "" ]] ; then
cd $1
fi
ls -1 | sed "s;^;$(pwd)/;"
@samisalkosuo
samisalkosuo / create_ios__icons.sh
Created December 14, 2015 05:28
Create iOS icons from source image.
#!/usr/bin/env bash
#uses clpargs
#https://github.com/samisalkosuo/clpargs
source $GITDIR/clpargs/clpargs.bash
clpargs_program_description "Create iOS app icons from original 1024x1024 icon."
#iOS icon sizes
#https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html
@samisalkosuo
samisalkosuo / generate_username.py
Last active January 5, 2017 09:57
Simple function to generate random usernames.
import sys
def generate_username(formatStr,capitalize=True):
"""Generate random user name. formatStr is like CVC-CVC which generates username with consonant-vowel-consonant-consonant-vowel-consonant.abs
C=consonant
V=vowel
N=number
+=space
"""