Skip to content

Instantly share code, notes, and snippets.

@nerdess
Last active April 6, 2021 09:35
Show Gist options
  • Save nerdess/54ea502e815f3361c27c to your computer and use it in GitHub Desktop.
Save nerdess/54ea502e815f3361c27c to your computer and use it in GitHub Desktop.
Command Line Foo
# Command Line Foo
## Webserver
Start simple HTTP-Server
python -m SimpleHTTPServer 8000
Finding stuff
grep -r -l "whatever string" . (-l shows file incl path)
Find out character encoding of file
file -I xyz.html
## SVN
Get information about a specific commit
svn log -v -r53382
Find by date
svn log -r {2006-11-20}:{2006-11-29}
Find by username
svn log | sed -n '/ | nerdess | /,/-----$/ p'
Diff
svn diff -c <revision>
Revert to commit
svn merge -c -12345 .
Revert deletion
svn revert --depth infinity deletedDir
Checkout specific version of a file
svn up -r12345 bla.txt
## SSH
Check all loaded SSH-keys
ssh-add -l
## Wordpress
Fix chartset issue when exporting/importing the db
1) Click the "Export" tab for the database
2) Click the "Custom" radio button
3) Go the section titled "Format-specific options" and change the dropdown for "Database system or older MySQL server to maximize output compatibility with:" from NONE to MYSQL40.
4) Scroll to the bottom and click "GO".
## Console
Bulk rename files
find . -name "*.bla" -exec rename 's/\.bla$/.js/' '{}' \;
## Gatsby
Enable local Gatsby app from being accesssible through local network
gatsby develop -H 0.0.0.0
## npm
npm outdated
find outdated packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment