Skip to content

Instantly share code, notes, and snippets.

View elhenro's full-sized avatar

Henry Schober elhenro

View GitHub Profile
@johnnyopao
johnnyopao / encrypt-all.sh
Created May 2, 2018 23:42
GPG Encrypt all files in directory
#!/bin/bash
# This uses gpg to encrypt every file in a directory as separate
# encrypted files
# Usage
# ./encrypt-all.sh ./dir-of-files-to-encrypt "PASSPHRASE"
FILES="$1"
PASSPHRASE="$2"
@random-robbie
random-robbie / install_go_pi.sh
Created April 26, 2018 14:16
Install Go Lang 1.10.1 on Raspberry Pi 3
wget https://storage.googleapis.com/golang/go1.10.1.linux-armv6l.tar.gz
sudo tar -C /usr/local -xvf go1.10.1.linux-armv6l.tar.gz
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc
@samdutton
samdutton / sample.vtt
Created February 2, 2018 01:52
Sample WebVTT caption file
WEBVTT
00:00:00.500 --> 00:00:02.000
The Web is always changing
00:00:02.500 --> 00:00:04.300
and the way we access it is changing
@jdelibas
jdelibas / .git-commit-template.txt
Last active January 14, 2021 11:43
git commit message template
# <type>(<scope>): (If applied, this commit will) <subject>
# feat(login): add password enforcement rules
# |<---- Try To Limit Each Line to a Maximum Of 100 Characters ---->|
# <body>
# |<---- Try To Limit Each Line to a Maximum Of 100 Characters ---->|
# <footer>
@simoncos
simoncos / golang_on_rpi.md
Last active November 2, 2021 04:11 — forked from konradko/golang_on_rpi.md
Install Golang 1.9 on Raspberry Pi

Install Golang 1.9:

wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile

If already installed old golang with apt-get:

@arkadiusjonczek
arkadiusjonczek / gist:8836e724a53ddd55362644745cf8ca4c
Created December 31, 2016 01:30
Start Chrome in App Mode on Mac OS X
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="http://www.google.de"
@citrusui
citrusui / dropdown.md
Last active March 18, 2024 09:23
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@samgooi4189
samgooi4189 / bcm57765or57785fix
Last active March 2, 2024 13:14
Fixing Broadcom Corporation BCM57765/57785 SDXC/MMC Card Reader
Follow the WORKAROUND:
1. Add a comand to /etc/rc.local, add the following line above "exit 0":
setpci -s 00:1c.2 0x50.B=0x41
2. Add the same comand to /etc/apm/resume.d/21aspm (which does not exist yet):
setpci -s 00:1c.2 0x50.B=0x41
3. Add the following to /etc/modprobe.d/sdhci.conf:
options sdhci debug_quirks2=4
4. Re-generate initrd:
sudo update-initramfs -u -k all
5. Reboot or reload sdhci module:
@noelboss
noelboss / git-deployment.md
Last active March 7, 2024 02:21
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

" Strip the newline from the end of a string
function! Chomp(str)
return substitute(a:str, '\n$', '', '')
endfunction
" Find a file and pass it to cmd
function! DmenuOpen(cmd)
let fname = Chomp(system("git ls-files | rofi -dmenu -i -l 20 -p " . a:cmd))
if empty(fname)
return