Skip to content

Instantly share code, notes, and snippets.

View PedroMartinSteenstrup's full-sized avatar

Pedro Martin-Steenstrup PedroMartinSteenstrup

View GitHub Profile
@Kovrinic
Kovrinic / .gitconfig
Last active April 11, 2024 11:50
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@venetucci
venetucci / NerdBot
Last active March 29, 2022 22:39
🤓 A Google Apps Script to use with Slack webhooks - allows you to post to a spreadsheet from Slack, and receive a confirmation message in Slack. Full tutorial with Slack integrations: https://medium.com/p/a-bot-to-help-you-read-your-way-through-next-4-years-7ba9d80066fc
function testNewItemPost() {
var request = {
parameters: {
token: "[]",
user_name: "michelle",
text: "add: Rural America; Hillbilly Elegy; J.D. Vance; From a former marine and Yale Law School graduate, a powerful account of growing up in a poor Rust Belt town that offers a broader, probing look at the struggles of America’s white working class; https://www.amazon.com/gp/product/0062300547/ref=pd_bxgy_14_2?ie=UTF8&pd_rd_i=0062300547&pd_rd_r=MG2AV2PZZVEXNYZ1Y84V&pd_rd_w=xCKNl&pd_rd_wg=55Iya&psc=1&refRID=MG2AV2PZZVEXNYZ1Y84V;"
}
};
doPost(request);
}
@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active April 19, 2024 16:03
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@kalinchernev
kalinchernev / countries
Created October 6, 2014 09:42
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
@leplatrem
leplatrem / yourapp
Last active September 24, 2023 23:01
gunicorn virtualenv init.d script (could be simpler with upstart)
#! /bin/bash
### BEGIN INIT INFO
# Provides: yourapp
# Required-Start: nginx
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The main django process
# Description: The gunicorn process that receives HTTP requests
# from nginx