Skip to content

Instantly share code, notes, and snippets.

Avatar
🤗
free hugs

todgru

🤗
free hugs
View GitHub Profile
@todgru
todgru / curl.md
Last active Dec 9, 2015
Notes about curl CURL cURL
View curl.md

#Bash and Curl

###cURL

Record an mp3 stream to a file:

$ curl http://example.com/stream.mp3 -o file.mp3

http://stream1.opb.org/kmhd_web.mp3

@todgru
todgru / ci_query.md
Created Dec 19, 2012
CI queries bindings code igniter
View ci_query.md
@todgru
todgru / git_revert.md
Created Dec 20, 2012
how to use git revert --strategy resolve
View git_revert.md

Oh yes, this is nice:

git revert --strategy resolve <sha-ish>

Given a git log of A--B--C--D--E you can remove commit C using:

git revert --strategy resolve <sha-of-C> 

Which will produce:

@todgru
todgru / mysql.md
Last active Dec 10, 2015
mysql sql command line cli dump backup restore tips tricks etc
View mysql.md

#MySQL

run mysql cli:

mysql -u [username] -p [databasename]

will prompt for password.

show databases;
use [databasename];
@todgru
todgru / git_amend.md
Last active Dec 10, 2015
change last git commit message amend
View git_amend.md

#git commit --amend

Use this to change the last commits message:

git commit --amend -m "New commit message"
View scp.md
@todgru
todgru / rest_example.md
Last active Dec 10, 2015
Example of a truly RESTful api rest hateoas HATEOAS
View grep.md

#grep

-A lines after find -B lines before find -n number the lines of the file and display that number before each result(s)

$ grep -A20 -B20 -n 'this is what im looking for' filnameToSearch.txt
@todgru
todgru / coffee-pour-over.md
Last active Dec 10, 2015
Pour over coffee method
View coffee-pour-over.md
@todgru
todgru / vim_info.md
Last active Jan 22, 2019
vim nerdtree copy paste search and replace
View vim_info.md

#vim

Editing

  • shift V select line, up or down select lines
  • shift > shift select block or line out
  • shift < shift select block or line in
  • d to delete highlighted text and copy to cliboard
  • D delete everything after cursor to end of line
  • y to copy (yank)
You can’t perform that action at this time.