Skip to content

Instantly share code, notes, and snippets.

View trentrand's full-sized avatar
🛰️
⠞⠗⠑⠝⠞

Trent Rand trentrand

🛰️
⠞⠗⠑⠝⠞
View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@gregmalcolm
gregmalcolm / debugging_c_with_llvm.md
Last active September 8, 2021 10:47
Debugging C with llvm's clang and lldb

Assuming you llvm installed (comes as standard on Mac OS Mavrick xtools)

Create a helloworld.c file:

  #include<stdio.h>
  
  int main()
  {
 int x=3;
@brianclements
brianclements / Commit Formatting.md
Last active July 19, 2024 13:32
Angular Commit Format Reference Sheet

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

@ajfisher
ajfisher / 0x00000.bin
Last active October 10, 2021 00:51
ESP8266 Transparent bridge to J5
@alexislucena
alexislucena / uncommitLastCommit.md
Created November 14, 2016 08:56
Git: How to uncommit my last commit in git

To keep the changes from the commit you want to undo

$ git reset --soft HEAD^

To destroy the changes from the commit you want to undo

$ git reset --hard HEAD^

You can also say

@111a5ab1
111a5ab1 / edgeos_cli_mss_wireguard
Last active December 2, 2021 23:28
EdgeOS CLI: TCP MSS clamping to resolve PMTUD black holes (RFC2923) when using Wireguard
set firewall options mss-clamp interface-type all
set firewall options mss-clamp mss 1380
set firewall options mss-clamp6 interface-type all
set firewall options mss-clamp6 mss 1360
@kribblo
kribblo / npm-unpublish-range.sh
Created March 19, 2018 10:09
npm unpublish a range of versions
# Example: npm unpublish the-package from 0.5.31 to 0.5.41
for i in $(seq 31 41); do npm unpublish "the-package@0.5.$i"; done
# list available versions of the-package:
npm show the-package versions
@marcuslindfeldt
marcuslindfeldt / mockVisit.js
Created July 30, 2018 12:43
Cypress PollyJS fetch mock
const uuidV4 = require('uuid/v4');
import { Polly } from '@pollyjs/core';
import FetchAdapter from '@pollyjs/adapter-fetch';
import LocalStoragePersister from '@pollyjs/persister-local-storage';
Polly.register(FetchAdapter);
Polly.register(LocalStoragePersister);
Cypress.Commands.add('mockVisit', (url, mocks = () => null, options) => {
return cy.visit(
@Serlych
Serlych / epub.css
Last active November 25, 2020 13:03 — forked from maticrivo/epub.css
You Don't Know JS Ebooks
body {
text-align: justify;
}
code, pre {
font-family: "Hack", monospace;
}
h1, h2, h3, h4, h5, h6 {
text-align: left;
@triwav
triwav / roku-proxy-setup.md
Created April 30, 2019 14:33
Roku Proxy Setup

This is largely based off of this article by Hulu and their roku-dev-cli tool.

Requirements:
The main requirement is a Mac with 2 available network interfaces WIFI <-> WIFI, LAN <-> WIFI, etc. This should work on other platforms as well but isn't covered here.

Setup
The first thing we need is Homebrew. If you've never used it before it's a great package manager for macOS that makes installing programs easier. Open Terminal and paste
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and hit enter