Skip to content

Instantly share code, notes, and snippets.

View rm--'s full-sized avatar

René rm--

View GitHub Profile
@rm--
rm-- / pg_dump_restore.md
Last active May 17, 2016 15:02
postgresql: dump and restore databases
pg_dump dbname > outfile
psql dbname < infile
@rm--
rm-- / macOS_apps.md
Last active February 17, 2020 09:36
macOS apps

gui apps

  • 1password
  • alfred
  • brave
  • chrome
  • clipmenu
  • docker
  • filezilla
  • firefox
  • gimp
@rm--
rm-- / headless_vbox_vms.md
Last active December 2, 2016 16:33
start virtualbox vms headless

list vms

VBoxManage list vms

<vm_name>

start vm headless

VBoxManage startvm <vm_name>--type headless

@rm--
rm-- / search_spotify_user.md
Created December 6, 2016 19:10
search for spotify users

spotify:user:

@rm--
rm-- / test.gradle
Created December 15, 2016 15:57
debug gradle tests
```
println "main.java.files = ${sourceSets.main.java.files.name}"
println "test.java.files = ${sourceSets.test.java.files.name}"
println "main.output.classesDir = ${sourceSets.main.output.classesDir}"
println "test.output.classesDir = ${sourceSets.test.output.classesDir}"
println "main.java.srcDirs = ${sourceSets.main.java.srcDirs}"
println "test.java.srcDirs = ${sourceSets.test.java.srcDirs}"
println "main.resources.srcDirs = ${sourceSets.main.resources.srcDirs}"
println "test.resources.srcDirs = ${sourceSets.test.resources.srcDirs}"
println "main.allSource.files = ${sourceSets.main.allSource.files}"
git submodule update --init
@rm--
rm-- / prepare-commit-msg
Last active April 9, 2017 09:56
add issue number from branch to commit msg
#!/bin/bash
# Extact issue tag (e.g. feature/TAG-123 -> TAG-123, ANOTHERTAG-123-description -> ANOTHERTAG-123)
fetch_issue_tag() {
git rev-parse --abbrev-ref HEAD | grep -e '[A-Z]\+-[0-9]\+' -o
}
BRANCH_NAME=$( git branch | grep '*' | sed 's/* //' )
ISSUE_TAG=$( fetch_issue_tag )
FIRSTLINE="$( head -n 1 "$1" )"
@rm--
rm-- / spotify.album.cmd
Created April 11, 2017 06:30
spotify album search
https://open.spotify.com/album/<id>
in spotify desktop app:
spotify:album:<id>
@rm--
rm-- / gist:feb846f8812ecc67c9ab58b272910c5e
Last active January 25, 2018 19:52
Stop Android File Transfer from Launching Automatically
  • kill Android\ File\ Transfer\ Agent
  • rm -r ~/Library/Application\ Support/Google/Android\ File\ Transfer/Android\ File\ Transfer\ Agent.app
  • cd /Applications/Android\ File\ Transfer.app/Contents/Resources
  • mv Android\ File\ Transfer\ Agent.app Android\ File\ Transfer\ Agent.app.disable
@rm--
rm-- / gist:bd98ffb138c33527c1bab6e68ed5c331
Created October 4, 2017 19:55
iterm2 jump back and forward
https://coderwall.com/p/h6yfda/use-and-to-jump-forwards-backwards-words-in-iterm-2-on-os-x
Here's how you can configure iTerm 2 on OSX to allow you to use ⌥ ← and ⌥→ to do just that.
First you need to set your left ⌥ key to act as an escape character.
Second you need to either locate the current shortcut for ⌥ ← or create a new one, in the Profile Shortcut Keys, with the following settings:
Keyboard Shortcut: ⌥←
Action: Send Escape Sequence
Esc+: b