Skip to content

Instantly share code, notes, and snippets.

@jaydansand
jaydansand / docker-shell.sh
Last active June 28, 2022 21:18
Launch a shell in a Docker container/image
#!/bin/sh
# Author: Jay Dansand
# URL: https://gist.github.com/jaydansand/29744bd44d6ea68611e430a401cb7d14
# Date: May 29 2019, modified June 28 2022
CONTAINER="$1"
if [ -z "$CONTAINER" ]; then
echo "Usage: `basename $0` container|service [shell command]"
echo " Executes shell command (default bash || sh) in a container. If CONTAINER"
echo " is not a running Docker container (appearing in 'docker ls -a') then it"
@thislooksfun
thislooksfun / .bash_profile
Last active May 9, 2017 18:09
My personal .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
  1. Mount BOOTCAMP disk
  2. Run 'diskutil info /Volumes/BOOTCAMP'
  3. Run 'sudo vifs' and replace old id with the value taken from 'Volume UUID' from the 'diskutil list' above'

More info (Hopefully this link doesn't die like the last one did...)

// screep astar
// based off of javascript-astar 0.4.1
// http://github.com/bgrins/javascript-astar
// Freely distributable under the MIT License.
// Implements the astar search algorithm in javascript using a Binary Heap.
// Includes Binary Heap (with modifications) from Marijn Haverbeke.
// http://eloquentjavascript.net/appendix2.html
// Modified for Screeps by Robert Hafner
@Calvein
Calvein / getObjects.js
Created April 29, 2014 04:49
Get all objects from a parse class
// Returned promise
var promise = new Parse.Promise()
// Error function
var error = function() {
console.error('Error:', arguments)
// Break it
response.error('Query failed, check logs')
}
@danielestevez
danielestevez / gist:2044589
Last active April 10, 2024 07:51
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}