Skip to content

Instantly share code, notes, and snippets.

View DannyDannyDanny's full-sized avatar
👾
exploring codespaces w/ Nix

Daniel Thoren DannyDannyDanny

👾
exploring codespaces w/ Nix
  • Data Engineer @ Lundbeck [DNTH]
  • Copenhagen
View GitHub Profile
@cmrfrd
cmrfrd / gist:fe8f61da076f8a4a751bf8fc8cb579a5
Created December 28, 2022 04:12
ipad_screen_mirror_server
#! /usr/bin/env nix-shell
#! nix-shell --quiet -p uxplay -i bash
set -ueo pipefail
## Clear any existing "DROP ME" rules
## ref: https://stackoverflow.com/a/63855690/12393422
while sudo iptables -L -n --line-number | grep "DROP ME" > /dev/null; do
sudo iptables -D INPUT $(sudo iptables -L -n --line-number | grep "DROP ME" | head -1 | awk '{print $1}');
done
@ttys3
ttys3 / gruvbox-material-alacritty.yml
Created January 16, 2021 03:33 — forked from sainnhe/gruvbox-material-alacritty.yml
Gruvbox Material for Alacritty
# The definition of color schemes.
schemes:
gruvbox_material_hard_dark: &gruvbox_material_hard_dark
primary:
background: '0x1d2021'
foreground: '0xd4be98'
normal:
black: '0x32302f'
red: '0xea6962'
green: '0xa9b665'
@discdiver
discdiver / jupyterlab_shortcuts.md
Last active November 5, 2024 02:22
Common Jupyter Lab Keyboard Shortcuts

If you are on a Mac, substitute command for control. Don't type the + (it means press both keys at once).

Shortcuts when in either command mode (outside the cells) or edit mode (inside a cell):

  • Shift + Enter run selected cell or cells - if no cells below, insert a code cell below

  • Ctrl + B toggle hide/show left sidebar

  • Ctrl + S save and checkpoint

  • Ctrl + Shift + S save as

@swedishmike
swedishmike / gist:902fb27d627313c31a95e31c44e302ac
Created October 17, 2019 13:07
Adding and removing virtual environments to Jupyter notebook
## Create the virtual environment
conda create -n 'environment_name'
## Activate the virtual environment
conda activate 'environment_name'
## Make sure that ipykernel is installed
pip install --user ipykernel
## Add the new virtual environment to Jupyter
@planetceres
planetceres / install_pipenv.md
Created February 3, 2019 21:31
pipenv installation notes Ubuntu 18.04

Installation Notes for pipenv on Ubuntu 18.04

1. Add ~/.local/bin to PATH

pypa/pipenv#2122 (comment)

echo 'export PATH="${HOME}/.local/bin:$PATH"' >> ~/.bashrc
@haxpor
haxpor / note.log
Created October 17, 2018 14:29
Note from Mastering Vim Language By Chris Toomey without plugins section at around 12 minutes at the end
* dw - delete word
* . - to repeat changes
* u - undo changes (atomic operation)
* verbs in vim
- d => delete
- c => change
- > => indent
- v => visually select
- y => yank (copy)
* cw - delete and get into insert mode
@ibraheem4
ibraheem4 / postgres-brew.md
Last active October 14, 2024 11:59 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@sloanlance
sloanlance / Editing remote files in Vim with SSH.md
Created July 13, 2017 16:11
Editing remote files in Vim with SSH

Editing remote files in Vim with SSH

  1. Configure SSH

    In ~/.ssh/config, include the lines:

    Host *
    ControlPath ~/.ssh/sockets/%r@%h-%p
    
@ascendbruce
ascendbruce / README.md
Last active November 15, 2024 07:19
Use macOS-style shortcuts in Windows

Use macOS-style shortcuts in Windows / keyboard mappings using a Mac keyboard on Windows

ℹ️ There is a newer alternative project that does similar things and more, check it out at https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows

Make Windows PC's shortcut act like macOS (Mac OS X) (using AutoHotkey (ahk) script)

With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.

How does it work

@claymcleod
claymcleod / pycurses.py
Last active October 13, 2024 16:45
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()