Skip to content

Instantly share code, notes, and snippets.

View alexruimy's full-sized avatar

Alex Ruimy alexruimy

View GitHub Profile
@ankjevel
ankjevel / clear-cache.sh
Last active April 18, 2024 08:31
clear npm cache (when using nvm); run with `nvm list | clear-cache`
#!/usr/bin/env bash
function clear-cache {
versions=()
while read -r line; do
clean="$(echo ${line} | sed "s,$(printf '\033')\\[[0-9;]*[a-zA-Z],,g")"
valid=$(echo "${clean}" | grep '^[^a-zA-Z]' | grep -v 'system' | sed 's/->//' | sed 's/\s.*v//')
if [[ ! -z $valid ]]; then
versions+=(${valid})
@hsab
hsab / run-program.ahk
Created September 2, 2018 21:59
Run a program with a keyboard shortcut with AutoHotKey
; This is a simple and pretty generic example of an AutoHotkey script to run a
; program when you press a keyboard shortcut. Add as many of these as you want
; to a .ahk file, and set that to be run at startup.
; See the Hotkeys reference [1] for details of the modifiers and keys available.
; [1]: http://www.autohotkey.com/docs/Hotkeys.htm
; Win+Alt+G - Open Gmail in Chrome
@psgganesh
psgganesh / custom-vs-code-fonts.md
Last active March 25, 2024 14:27
Custom fonts for vs code!
@madyasiwi
madyasiwi / django-shell-notebook-setup.md
Last active November 20, 2022 18:17
Guide to setup Django-shell Jupyter notebook running in Docker container

Setting Up Django-Shell Jupyter Notebook in Docker Container

This guide assumes that your django application already running in the container.

1. Install required python packages

You will have to make sure that django-extensions and jupyter packages are installed in the container's python virtual environment.

If you need to shell into the container as root user to do this, you can do so from the host PC:

@dmitryhd
dmitryhd / slackbot.py
Last active November 7, 2019 20:11
slackbot.py
__all__ = [
'SlackBot',
'RecBot',
]
import os
import time
import re
import subprocess
from functools import wraps
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@veuncent
veuncent / docker_debugging.md
Last active February 21, 2024 00:58
Debugging Django apps running in Docker using ptvsd - Visual Studio (Code)

Remote debugging in Docker (for Django apps)

In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):

  1. Add ptvsd to your requirements.txt file
ptvsd == 4.3.2
  1. To your launch.json, add this:
@itod
itod / split_keyboards.md
Last active May 30, 2024 06:46
Every "split" mechanical keyboard currently being sold that I know of
@ascendbruce
ascendbruce / README.md
Last active May 26, 2024 22: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

@teeberg
teeberg / circleci.py
Created January 8, 2016 23:19
CircleCI Command Line Helper
#!/usr/bin/env python
import os
import pprint
import subprocess
import sys
from optparse import make_option
from urllib import quote_plus
from urlparse import urljoin
import dateutil.parser