Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@voodoohop
voodoohop / workflow.sh
Created February 4, 2020 13:31 — forked from Honga1/workflow.sh
A git rebase workflow explained
# To add a change to our repository
git checkout -b "feature/feature-name" # Creates a branch called "feature/feature-name", then checks it out, locally.
git push --set-upstream origin feature/feature-name # Publish the branch on GitHub
# Make changes to your files
git add FILENAME(S) # Adds your files to "Tracked".
git status # See your "Tracked and Untracked files (green and red respectively"
@colinvh
colinvh / aws.md
Last active April 23, 2024 09:15
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

## Step 1
Open C:\Windows\System32\drivers\etc\hosts
## Step 2
Add 1.2.3.4 account.jetbrains.com
## Step 3
Add this key to Phpstorm
``1W61R3J3UL-eyJsaWNlbnNlSWQiOiIxVzYxUjNKM1VMIiwibGljZW5zZWVOYW1lIjoi5r+A5rS75p2l5rqQIHd3d8K3YWppaHVvwrdjb20iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiIiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSU0MiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJHTyIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiUEMiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSQyIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IkNMIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSRCIsInBhaWR
@cstroe
cstroe / fuse.md
Last active April 23, 2024 09:13
FUSE on Ubuntu

FUSE on Ubuntu

It seems that Fuse is compiled into the Ubuntu kernel by default.

To test you can use sshfs:

sudo apt-get install sshfs
mkdir tmp
sshfs localhost:/tmp ./tmp

ls tmp

@Yegorov
Yegorov / ya.py
Created January 13, 2018 16:08
Download file from Yandex.Disk through share link
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# https://toster.ru/q/72866
# How to
# wget http://gist.github.com/...
# chmod +x ya.py
# ./ya.py download_url path/to/directory
import os, sys, json
import aspose.pycore as aspycore
from aspose.imaging import Image, Color
from aspose.imaging.imageoptions import PdfOptions, EmfRasterizationOptions
import os
if 'TEMPLATE_DIR' in os.environ:
templates_folder = os.environ['TEMPLATE_DIR']
else:
templates_folder = r"C:\Users\USER\Downloads\templates"
@coenraadhuman
coenraadhuman / inotify.md
Last active April 23, 2024 09:09
Increasing the amount of inotify watchers

Increasing the amount of inotify watchers

Take note this is my personal edited version and the command related to Arch has been changed to work on my Arch system.

Increase inotify watchers

@KacperKozak
KacperKozak / ctrl-enter.js
Last active April 23, 2024 09:06
[Ctrl] + [Enter] to submit forms
document.body.addEventListener('keydown', (event) => {
if(event.key === "Enter" && (event.metaKey || event.ctrlKey)) {
event.target.form?.submit();
}
});
@avishayp
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
@firexcy
firexcy / readme.md
Last active April 23, 2024 09:06
DIY a Rewind.ai

This Gist provides a solution to periodically capture screenshots of your Mac, and create therefrom a searchable PDF archive so that you can always get an answer to the “what, when, and where” questions about your usages.

To use these scripts:

  1. Download the shell script rewind, then:
    1. put it under ~/bin (or other fixed path you prefer);
    2. execute