Skip to content

Instantly share code, notes, and snippets.

View DR-DinoMight's full-sized avatar
💻
Developing like crazy!

Matthew Peck-Deloughry DR-DinoMight

💻
Developing like crazy!
View GitHub Profile
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@m3nd3s
m3nd3s / NERDTree.mkd
Last active November 23, 2023 13:45
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@NoobsArePeople2
NoobsArePeople2 / gist:5121597
Last active November 10, 2023 14:33
Configure media keys on a non-Apple keyboard to control Spotify via AppleScript and USB Overdrive on OSX.

Requirements

  1. USB Overdrive
  2. A non-Apple keyboard with media keys (or keys you want to make "media" keys). For reference, I'm using a Microsoft Sidewinder X4

Set Up

  1. Plug in your keyboard and install USB Overdrive.
  2. Open USB Overdrive. Click into the Settings tab.
  3. Click the dropdown and select "Any Keyboard, Any Application"
@gig3m
gig3m / Default (OSX).sublime-keymap
Created April 19, 2013 04:41
Sublime Text 2 Vintage Lefty Remap (ijkl movement)
[
{ "keys": ["h"], "command": "enter_insert_mode",
"context":
[
{"key": "setting.command_mode"},
{"key": "selection_empty"}
]
},
{ "keys": ["H"], "command": "enter_insert_mode", "args":
{"insert_command": "vi_move_to_first_non_white_space_character"},
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active July 11, 2024 10:06
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@zolzaya
zolzaya / kaminari_load_more.md
Last active February 2, 2021 02:01
Most easy "load more" behavior implementation for Kaminari.

In your view:

<%= link_to "Load more", posts_path(@posts, page: @posts.current_page+1), id: "load-more-posts", remote: true %>

In your controller:

respond_to :html, :js, only: [:index]

def index
@robneu
robneu / install-wordpress-ssh.el
Last active April 3, 2018 07:20
How to Install WordPress via SSH - Installing WordPress via the command line is one of the fastest, easiest ways to get up and running on WordPress. Running this command will take literally 30 seconds. Assuming you've already created a database, all you have to do is run the WordPress install script and you're ready to start publishing!
wget -qO- http://wordpress.org/latest.tar.gz | tar xz && cp -rpf wordpress/* . && rm -r wordpress
@mayel
mayel / up
Last active January 2, 2022 01:11
up: script to keep your Mac up-to-date (both OS and Homebrew updates) via the command line
replaced by https://gist.github.com/mayel/c07bc0acb91824501d5bdbdc9eb7b33a