Skip to content

Instantly share code, notes, and snippets.

@srpomeroy
srpomeroy / common_functions.rb
Created July 6, 2018 03:23
Commonly used functions in RightScale CATs
# Required prolog
name 'LIB - Common functions'
rs_ca_ver 20160622
short_description "Common functions"
package "common/functions"
# Checks if the account supports the selected cloud
define checkCloudSupport($cloud_name, $param_location) do
# Gather up the list of clouds supported in this account.
@pudquick
pudquick / word_magic.py
Last active August 29, 2015 14:17
Saturday morning fun.
import sys, os.path, csv
# Run me like: python word_magic.py inputfile.csv output_dir
KEEP_WORD = True
# We're being lazy here - no main for us, it's Saturday
in_filename = sys.argv[1]
out_dir = os.path.abspath(sys.argv[2])
@magnetikonline
magnetikonline / README.md
Last active July 28, 2022 07:25
Install Parallels version 10/11/12/13 tools on Ubuntu server guest.

Install OSX Parallels version 10/11/12/13 tools on Ubuntu server guest

Have tested these instructions successfully under Ubuntu 16.04LTS and 14.04LTS.

  • Create Ubuntu server instance under Parallels (obviously).
  • Start VM, goto Actions - Install Parallels Tools... to mount the ISO image.
    • Note: if this fails, or updating tools for an existing guest you can do the following:
    • Goto Devices > CD/DVD 1 > Connect Image....
    • Select the following ISO image: /Applications/Parallels Desktop/Contents/Resources/Tools/prl-tools-lin.iso.
    • This will mount the tools CD image.
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active March 23, 2024 05:23
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@peelman
peelman / bbdiff
Created May 22, 2012 21:12
Use TextMate to impersonate BBEdit for use with GitBox
#!/bin/bash
diff -u $1 $2 | mate -w
@jbgo
jbgo / git-recover-branch.md
Last active December 19, 2023 02:49
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring