Skip to content

Instantly share code, notes, and snippets.

View TotalLag's full-sized avatar

Chris Phan TotalLag

View GitHub Profile
@stevejenkins
stevejenkins / config.boot
Last active August 8, 2016 23:19
My config.boot on a UBNT EdgeRouter 5 PoE
firewall {
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description "WAN to Internal"
@molotovbliss
molotovbliss / gist:6c22ff02b50ccce3a643
Created February 17, 2015 07:43
sitemap.xml to .txt list of urls one liner, used with siege
php -r '$x=new SimpleXMLElement(file_get_contents("sitemap.xml"));foreach($x->url as $n) echo $n->loc.PHP_EOL;' > urls.txt
@timrs2998
timrs2998 / ubuntu_chromebook.md
Last active December 30, 2020 22:58
Ubuntu on Acer CB3-111-C670 Chromebook

This markdown file explains how to run Ubuntu on your Acer CB3-111-C670 Chromebook through Crouton.

Developer Mode

You first need to put your chromebook in developer mode.

To invoke Recovery mode, you hold down the ESC and Refresh (F3) keys and poke the Power button.

To enter Dev-mode you first invoke Recovery, and at the Recovery screen press Ctrl-D (there's no prompt - you have to know to do it). It will ask you to confirm, then reboot into dev-mode.

@aheadley
aheadley / README.md
Last active November 18, 2021 02:16
Some scripts to help with turning a CentOS 7 VM into a template in Proxmox

EL7 VM Templatization for Proxmox

Description

These are some handy tools to turn a VM into a template, so that creating a new VM is as simple as (full) clone and boot. There are several assumptions made that may not necessarily match with anyone else's environment:

  • CentOS 7 minimal install (will probably work on any flavor of EL7)
  • DHCP server available
  • rootfs (/) is on the last partition of the primary disk, and is a primary partition
  • a centos user exists on the VM (this is not a hard requirement, nothing bad will happen if it's not true)
@JeremyMorgan
JeremyMorgan / OpenGraphHeader.htm
Last active January 16, 2022 21:24
Template for Open Graph Tags. Adding these to your pages will help you display information better on Google+, Facebook and Twitter. Just replace the values with their own.
<meta itemprop="name" content="[ TITLE ]" />
<meta itemprop="image" content="[ LISTING IMAGE ]" />
<meta itemprop="description" content="[ ARTICLE DESCRIPTION ]" />
<meta name="description" content="[ ARTICLE DESCRIPTION ]" />
<meta name="author" content="[ AUTHOR FULL NAME ]" />
<meta property="article:author" content="[ GOOGLE+ AUTHOR URL ]" />
<meta property="article:published_time" content="[ PUBLISHED TIMESTAMP ]" />
<meta property="article:section" content="[ CATEGORY ]" />
@cb109
cb109 / breakpoint.js
Last active May 5, 2022 15:40
Vue Breakpoints Mixin (also available via npm: https://www.npmjs.com/package/vue-md-breakpoint)
// Now officially integrated into Vuetify:
//
// https://github.com/vuetifyjs/vuetify/blob/master/src/components/VApp/mixins/app-breakpoint.js
// https://github.com/vuetifyjs/vuetify/blob/master/src/components/VApp/mixins/app-breakpoint.spec.js
/**
* A Vue mixin to get the current width/height and the associated breakpoint.
*
* Useful to e.g. adapt the user interface from inside a Vue component
* as opposed to using CSS classes. The breakpoint pixel values and
@zaydek-old
zaydek-old / bookmark.min.js
Last active January 22, 2023 13:42
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@mmstick
mmstick / Ubuntu Kernel Upgrader Script
Last active March 11, 2023 04:53
Asks the user whether they want to install the latest RC or stable, then downloads the correct kernel and installs it.
#!/bin/bash
cd /tmp
if ! which lynx > /dev/null; then sudo apt-get install lynx -y; fi
if [ "$(getconf LONG_BIT)" == "64" ]; then arch=amd64; else arch=i386; fi
function download() {
wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep "$1" | grep "$2" | grep "$arch" | cut -d ' ' -f 4)
}
@aaronparker
aaronparker / Redirect-FoldersOneDrive.ps1
Last active July 13, 2023 20:54
Redirects select folders into the OneDrive folder.
<#
.SYNOPSIS
Sets a known folder's path using SHSetKnownFolderPath.
.PARAMETER KnownFolder
The known folder whose path to set.
.PARAMETER Path
The target path to redirect the folder to.
.NOTES
Forked from: https://gist.github.com/semenko/49a28675e4aae5c8be49b83960877ac5
#>
@eqhmcow
eqhmcow / hfsc-shape.sh
Last active August 2, 2023 11:59
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.