Skip to content

Instantly share code, notes, and snippets.

@Tras2
Tras2 / cloudflare-ddns-update.sh
Last active May 11, 2024 21:57
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@cstroe
cstroe / OpenSourceCRM.rst
Last active May 8, 2024 10:01
A distilled list of open-source CRM software
@nrollr
nrollr / nginx.conf
Last active May 11, 2024 16:31
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@fevangelou
fevangelou / default.vcl_PREFACE.md
Last active April 9, 2024 04:30
The perfect Varnish configuration for WordPress, Joomla, Drupal & other (common) CMS based websites

The perfect Varnish configuration for WordPress, Joomla, Drupal & other (common) CMS based websites

Updated on December 15th, 2021

IMPORTANT: Read this before implementing one of the configuration files below (for either Varnish 3.x or 4.x+).

USE: Replace the contents of the main Varnish configuration file located in /etc/varnish/default.vcl (root server access required - obviously) with the contents of the configuration you'll use (depending on your Varnish version) from the 2 examples provided below.

IMPORTANT: The following setup assumes a 180 sec (3 minute) cache time for cacheable content that does not have the correct cache-control HTTP headers. You can safely increase this to 300 sec (or more) for less busier sites or drop it to 60 sec or even 30 sec for high traffic sites. It obviously depends on your use case.

anonymous
anonymous / gist:8b4a0101f5101f756bb9
Created July 2, 2015 11:26
Get OAUTH2.0 access token for Google Voice with a shell-script
#!/bin/bash
##
## Authenticate with Google Voice
##
USAGE="`basename $0` {auth|refresh|token} ctx"
CTX_DIR=$HOME/.gvauth
CLIENT_ID="YOUR_CLIENTID_FROM_GOOGLE_DEVELOPER_CONSOLE"
CLIENT_SECRET="YOUR_CLIENTSECRET_FROM_GOOGLE_DEVELOPER_CONSOLE"
SCOPE="https://www.googleapis.com/auth/googletalk%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile"
STEP #1 – change your company logo (let’s start from easy…)
Hover the big Odoo logo on the left side, click on “Edit company data” and give your company your own logo – this will replace the Odoo placeholder logo.
STEP#2 – remove “Powered by Odoo”
Open the view web.login_layout and comment out following lines:
<!-- <span class="oe_footer_seperator"> | </span> -->
<!-- <a href="https://www.odoo.com" target="_blank">Powered by <span>Odoo</span></a> -->
Open the view web.menu_secondary and comment out following line:
@binarytemple
binarytemple / sourceforge.to.github.impor.markdown
Created April 27, 2015 09:05
import a sourceforge project (with full history) to github

In order to clone the TVN application from sourceforge to github I performed the following steps.

rsync -av rsync://tnv.cvs.sourceforge.net/cvsroot/tnv/* .
svn export --username=guest http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
cp ./cvs2svn-trunk/cvs2git-example.options ./cvs2git.options
vim cvs2git.options
cvs2svn-trunk/cvs2git --options=cvs2git.options --fallback-encoding utf-8
git@github.com:binarytemple/tnv.git tnv-github
git clone git@github.com:binarytemple/tnv.git tnv-github
@lrstanley
lrstanley / tunnel_4to6.py
Last active July 12, 2023 22:27
How to use tunnelbroker tunnels on KVM/OpenVZ/etc. (Debian)
"""
HE-2-4 Copyright (C) 2014 Liam Stanley
License: Eiffel Forum License, version 2
- https://links.ml/FFa1
Website: https://liamstanley.io
NOTE: THIS IS FOR KVM BASED SERVERS ONLY.
I'M NOT ADDING CUSTOM CHECKS TO SEE IF
YOU'RE USING KVM.
"""
@hwdsl2
hwdsl2 / README.md
Last active March 17, 2023 00:57
My IPTables rules for securing the Asterisk VoIP server