Skip to content

Instantly share code, notes, and snippets.

Avatar

Im immartian

View GitHub Profile
View build-git.sh
#!/bin/bash
GIT_VERSION="2.23.0"
yum install -y gcc wget make curl-devel expat-devel \
gettext-devel openssl-devel perl-devel zlib-devel
cd ~
if [ ! -f git-${GIT_VERSION}.tar.gz ]; then
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz
@jenbennings
jenbennings / index.js
Created Apr 16, 2018
Coinbase Commerce to Slack WebHook
View index.js
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const request = require('request');
admin.initializeApp(functions.config().firebase);
exports.saleAlert = functions.https.onRequest((req, res) => {
const product = req.body.event.data.checkout.id;
const id = req.body.event.data.code;
@schollz
schollz / run.sh
Created Oct 16, 2017 — forked from miguelmota/config.sh
IPFS change port
View run.sh
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/9001
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
@emlyn
emlyn / guitar.rb
Last active Aug 7, 2021
Strumming guitar chords in Sonic Pi
View guitar.rb
# Guitar Strumming - by Emlyn
# This tries to work out the guitar (or ukulele etc.) fingering for arbitrary chords (and tuning).
# It seems to work reasonably well for basic chords, but is quite naive and probably makes many mistakes.
# Ideas, bug reports, fixes etc. gratefully received, just comment below, or tweet @emlyn77.
# Feel free to make use of this code as you like (with attribution if you feel like it, but you don't have to).
# Thanks to @Project_Hell_CK for fixing the tuning, and spotting that it gets chord(:f, :major) not quite right.
# Next note higher or equal to base note n, that is in the chord c
define :next_note do |n, c|
# Make sure n is a number
@davestevens
davestevens / LetsEncrypt.md
Last active Oct 9, 2021
Let’s Encrypt setup for Apache, NGINX & Node.js
View LetsEncrypt.md

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
@developius
developius / README.md
Last active Oct 12, 2021
Setup SSH keys for use with GitHub/GitLab/BitBucket etc
View README.md

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@nerab
nerab / mail2kindle.md
Created Nov 30, 2011
Send eBooks to a Kindle from the MacOS command line
View mail2kindle.md
  1. Install msmtp, a simple sendmail stand-in that sends mail via a relay host (which is what you want, in almost all cases):

     brew install msmtp --with-macosx-keyring
    

    The flag with-macosx-keyring will make msmtp use the MacOS keychain, which is a pretty secure way to keep your mail account password secure.

  2. Configure it as described in this article. Don't use the manual installation method described there, Homebrew (which we used in step 1) is way more convenient.

  3. Have mail use msmtp instead of sendmail by creating .mailrc with the following content (or adding it, it the file already exists):