mirror of
https://github.com/donnemartin/data-science-ipython-notebooks.git
synced 2024-03-22 13:30:56 +08:00
Added common git stash commands.
This commit is contained in:
parent
93aeefe0c3
commit
e08077cb8c
144
commands/add_these.ipynb
Normal file
144
commands/add_these.ipynb
Normal file
|
@ -0,0 +1,144 @@
|
|||
{
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"signature": "sha256:ddec3db248ab2963bf72b2088852b351cab1451a8216cc20a88f1ade052fa425"
|
||||
},
|
||||
"nbformat": 3,
|
||||
"nbformat_minor": 0,
|
||||
"worksheets": [
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Command Lines"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# Done\n",
|
||||
"http://coolestguidesontheplanet.com/how-to-compress-and-uncompress-files-and-folders-in-os-x-lion-10-7-using-terminal/"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# Done\n",
|
||||
"http://stackoverflow.com/questions/16661982/check-folder-size-in-bash"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# Done\n",
|
||||
"http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# Done\n",
|
||||
"http://www.thegeekstuff.com/2012/04/curl-examples/"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# Done\n",
|
||||
"List number of files matching \u201c.txt\"\n",
|
||||
"ls -1 | grep .txt | wc -l"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# Done\n",
|
||||
"# Delete matching lines in place:\n",
|
||||
"sed -i '/Important Lines: /d\u2019 original_file"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"http://www.binarytides.com/linux-find-command-examples/\n",
|
||||
" \n",
|
||||
"Search for MySQL config\n",
|
||||
"sudo find / -name \u2018mysql.cnf\u2019\n",
|
||||
"\n",
|
||||
"Search for a file with matching name\n",
|
||||
"sudo find / -name \u2018site.cfg\u2019\n",
|
||||
"\n",
|
||||
"# Locate a program file in the user's path\n",
|
||||
"which python"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"CMD: Analytics\n",
|
||||
"CMD: Misc"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"https://danielmiessler.com/study/vim"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# Ruby\n",
|
||||
"curl -sSL https://get.rvm.io | bash -s stable\n",
|
||||
"\n",
|
||||
"brew doctor\n",
|
||||
"rvm install 1.8.7 --with-gcc=clang"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": []
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -251,6 +251,20 @@
|
|||
"!git commit --amend\n",
|
||||
"!git push --force [branch]\n",
|
||||
"\n",
|
||||
"# Take the dirty state of your working directory\n",
|
||||
"# and save it on a stack of unfinished changes\n",
|
||||
"!git stash\n",
|
||||
"\n",
|
||||
"# Get list of stashes\n",
|
||||
"!git stash list\n",
|
||||
"\n",
|
||||
"# Apply the top stash, re-modifying the \n",
|
||||
"# uncommitted files when the stash was saved\n",
|
||||
"!git stash apply\n",
|
||||
"\n",
|
||||
"# Apply a stash at the specified index\n",
|
||||
"!git stash apply stash@{1}\n",
|
||||
"\n",
|
||||
"# Create a branch\n",
|
||||
"!git branch [branch]\n",
|
||||
"\n",
|
||||
|
|
Loading…
Reference in New Issue
Block a user