Skip to content

Instantly share code, notes, and snippets.

@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@koshigoe
koshigoe / mount-ram.sh
Created February 11, 2011 14:57
Like tmpfs in Mac OSX
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@hongymagic
hongymagic / pr.md
Last active December 15, 2017 09:50 — forked from piscisaureus/pr.md
Checkout pull-requests from Atlassian Stash without adding remote

Locate the section for your stash remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:private/repository.git

Now add the line fetch = +refs/pull-requests/*:refs/remotes/origin/pull-requests/* to this section. Obviously, change the stash url to match your project's URL. It ends up looking like this:

@Velrok
Velrok / random_name_generator.clj
Created September 28, 2013 11:45
Random name generator using combining adjectives with animals.
(def adjectives [
"adorable"
"adventurous"
"aggressive"
"alert"
"attractive"
"average"
"beautiful"
"blue-eyed "
"bloody"
@michaelwallett
michaelwallett / team_name_generator.js
Created January 29, 2014 17:04
Team name generator
var sys = require("sys");
var fs = require('fs')
var adjectives = [];
var animals = [];
var stdin = process.openStdin();
stdin.addListener("data", function(d) {
if (adjectives.length === 0) {
@g-k
g-k / gpg-git-smudge-clean.md
Last active September 4, 2024 13:51
test transparent git encryption with smudge clean filters using gpg

Generate a GPG Key and revocation cert per http://www.gnupg.org/gpg/en/manual.html:

gpg --key-gen
gpg --output revoke.asc --gen-revoke <my user ID or email>

Once gpg key in keyring we can encrypt and decrypt files.

@teppeis
teppeis / md2cf.sh
Created September 11, 2014 04:15
Convert Markdown to Confluence
#!/bin/sh
# Convert Markdown to Confluence
#
# Supported syntax
# * heading (1-6)
# * blockquote (only single line ".bq")
# * code block fence (```)
# * inline code (`foo`)
# * link ([name](url))
#!/usr/bin/env bash
size=1024 # MB
mount_point=$HOME/tmp
name=$(basename "$mount_point")
usage() {
echo "usage: $(basename "$0") [mount | umount | remount | check | orphan]" \
"(default: mount)" >&2
}
@jesusgoku
jesusgoku / NamesGenerator.php
Last active January 2, 2016 12:53
Port of NameGenerator use for Docker
<?php
namespace JesusGoku;
/**
* NamesGenerator
*
* Port of NameGenerator use for Docker
*
* @author Jesús Urrutia <[email protected]>
@brianlechthaler
brianlechthaler / namegen.sh
Created October 21, 2015 17:01
Name Generator
echo First word, Adjective:
curl -s "http://api.wordnik.com:80/v4/words.json/randomWord?hasDictionaryDef=false&includePartOfSpeech=adjective&minCorpusCount=0&maxCorpusCount=-1&minDictionaryCount=1&maxDictionaryCount=-1&minLength=5&maxLength=-1&api_key=YOUR_API_KEY_HERE"
echo
echo
echo Second word, Noun:
curl "http://api.wordnik.com:80/v4/words.json/randomWord?hasDictionaryDef=false&includePartOfSpeech=noun&minCorpusCount=0&maxCorpusCount=-1&minDictionaryCount=1&maxDictionaryCount=-1&minLength=5&maxLength=-1&api_key=YOUR_API_KEY_HERE"
echo
echo
echo Now, combine these two, and you have your name.
echo For example, if your two words were ‘taught’ and ‘webzines’, your name would be TaughtWebzines.