Skip to content

Instantly share code, notes, and snippets.

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git co -b temp
@scmgopal
scmgopal / gist:3856ed2856934cdf9278
Created August 6, 2014 05:13
Git Submodules CheatSheet
Recipes
Note: the [main]$ bits on each line represents your bash prompt. You should only type the stuff after the $.
Set up the submodule for the first time:
[~]$ cd ~/main/
[main]$ git submodule add git://github.com/my/submodule.git ./subm
[main]$ git submodule update --init
[main]$ git commit .gitmodules -m "Added submodule as ./subm"
@scmgopal
scmgopal / ChefCommands.md
Created July 16, 2016 11:59 — forked from arttuladhar/Kitchen-CheetSheet.md
Chef and Knife Commands CheatSheet

*** Knife Commands ***

Getting Knife Version

knife --version

Create Cookbook

knife cookbook create <cookbookName>

@scmgopal
scmgopal / bash-cheatsheet.sh
Created December 16, 2016 16:18 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@scmgopal
scmgopal / knife cheat
Created February 24, 2017 06:34 — forked from ipedrazas/knife cheat
Hello!
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
@scmgopal
scmgopal / bash-cheatsheet.md
Created February 24, 2017 06:38 — forked from slowkow/bash-cheatsheet.md
Bash cheatsheet

Regular expression matching:

a=foobar
[[ "$a" =~ "^foo" ]] && echo "matches ^foo"

Array from a glob:

## Useful Commands
Get kubectl version
kubectl version
Get cluster info:
@scmgopal
scmgopal / knife cheat
Created February 24, 2017 06:45 — forked from nikitux/knife cheat
knife cheat
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
// Highcharts CheatSheet Part 1.
// Create interactive charts easily for your web projects.
// Download: http://www.highcharts.com/download
// More: http://api.highcharts.com/highcharts
// 1. Installation.
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks.
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
// <script src="https://code.highcharts.com/highcharts.js"></script>
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html