Skip to content

Instantly share code, notes, and snippets.

View schaary's full-sized avatar

Michael Schaarschmidt schaary

  • Halle (Saale), Germany
View GitHub Profile
@schaary
schaary / doom.txt
Created February 28, 2021 21:36 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@schaary
schaary / phoenix_to_umbrella
Created June 8, 2019 10:28 — forked from emilsoman/phoenix_to_umbrella
How to move an existing phoenix app under an umbrella app
How to convert existing phoenix app to an umbrella app.
https://elixir-lang.slack.com/archives/phoenix/p1472921051000134
chrismccord [10:14 PM]
@alanpeabody yes, it's straightforward
[10:14]
1) mix new my_umbrella --umbrella
@schaary
schaary / install-ripgrep-on-ubuntu.sh
Created March 23, 2019 10:48 — forked from kostaz/install-ripgrep-on-ubuntu.sh
Install ripgrep on Ubuntu
#!/bin/bash
[[ $UID == 0 ]] || { echo "run as sudo to install"; exit 1; }
REPO="https://github.com/BurntSushi/ripgrep/releases/download/"
RG_LATEST=$(curl -sSL "https://api.github.com/repos/BurntSushi/ripgrep/releases/latest" | jq --raw-output .tag_name)
RELEASE="${RG_LATEST}/ripgrep-${RG_LATEST}-x86_64-unknown-linux-musl.tar.gz"
TMPDIR=$(mktemp -d)
cd $TMPDIR
wget -O - ${REPO}${RELEASE} | tar zxf - --strip-component=1
@schaary
schaary / spacemacs-keybindings
Created October 24, 2018 21:12 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
Select resources_assign.*
FROM resources_assign
LEFT JOIN termine ON (termine.termin_id = resources_assign.`assign_user_id`)
LEFT JOIN auth_user_md5 ON (auth_user_md5.user_id = resources_assign.`assign_user_id`)
WHERE auth_user_md5.user_id IS NULL
AND termine.termin_id IS NULL
@schaary
schaary / index.md
Last active August 29, 2015 14:11 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')