Skip to content

Instantly share code, notes, and snippets.

View kylejcarlton's full-sized avatar

Kyle J Carlton kylejcarlton

View GitHub Profile
@davydany
davydany / IPTABLES-CHEATSHEET.md
Last active March 19, 2024 21:29
IP Tables (iptables) Cheat Sheet

IP Tables (iptables) Cheat Sheet

IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.

Resources

The following list is a great set of documentation for iptables. I used them to compile this documentation.

@knanne
knanne / buildFeedCard.js
Last active January 3, 2023 20:39
JS Function to transform RSS feed into Bootstrap 4 Card
/*
* code to transform list of RSS feeds into bootstrap cards
* view my tutorial at https://knanne.github.io/posts/how-to-create-a-custom-rss-reader
* 1 DEPENDENCY - YQL: https://developer.yahoo.com/yql/
* Adhere to Google News GUIDELINES as standard for parsing RSS feeds
* (e.g. link to source, site author etc.)
* https://support.google.com/news/publisher/answer/4203?hl=en
*/
// make YQL query as url string
@odarriba
odarriba / OpenVPN on Docker and Raspberry Pi.md
Last active March 12, 2024 15:13
How to install OpenVPN with Docker on Raspberry Pi

First of all, we are going to store all the data in a Docker shared volume, called openvpn_data.

To initialise the OpenVPN configuration and CA:

$ docker run -v openvpn_data:/etc/openvpn --rm evolvedm/openvpn-rpi ovpn_genconfig -u udp://your-vpn.address.com
$ docker run -v openvpn_data:/etc/openvpn --rm -it evolvedm/openvpn-rpi ovpn_initpki

To start daemon (and auto-restart it):

@cvan
cvan / HOWTO.md
Last active March 20, 2024 17:56
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@jtyr
jtyr / VirtualBoxKickstart.md
Last active February 23, 2024 01:38
How to use kickstart in VirtualBox

How to use kickstart in VirtualBox

This short howto describes how to install VMs via kickstart in VirtualBox. It's using PXE functionality built into the NAT network mode of the VirtualBox. The following instructions apply to CentOS installation but it should work for any RedHat-based distro.

Prepare directory structure

@beezly
beezly / gist:9b2de3749d687fdbff3f
Last active April 19, 2023 13:14
Log Nest temperatures into a Google Spreadsheet. Update the username and password values and create a resource trigger to call "getData" at regular intervals.
function performLogin(email, password) {
var payload = {
"username" : email,
"password" : password
};
var options = {
"method" : "post",
"payload" : payload
};
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();