Skip to content

Instantly share code, notes, and snippets.

View forksofpower's full-sized avatar
:shipit:

Patrick Jones forksofpower

:shipit:
View GitHub Profile
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable @typescript-eslint/naming-convention */
interface ZendeskWidgetCommander {
/** @see https://developer.zendesk.com/embeddables/docs/widget/core#clear */
(type: 'webWidget', command: 'clear'): void;
/** @see https://developer.zendesk.com/embeddables/docs/widget/core#close */
(type: 'webWidget', command: 'close'): void;
/** @see https://developer.zendesk.com/embeddables/docs/widget/core#get-display */
@forksofpower
forksofpower / wsl-setup.md
Created April 30, 2020 00:26 — forked from imfing/wsl-setup.md
WSL + ZSH + Hyper Setup

My WSL Setup

A guide to setup your WSL with Hyper and zsh

Download & Install the WSL

  • Follow the very thorough instructions here

Get a prettier terminal

  • Download Hyper.js here - I went with the 'hyperblue' theme.
@forksofpower
forksofpower / findRandomGame.js
Created March 3, 2019 06:37 — forked from theoperatore/findRandomGame.js
Get random game metadata via giant-bomb api for any platform
// depends on fetch, async/await (node 8.2.1+)
require('isomorphic-fetch');
const getAllPlatforms = async apiKey => {
const rawResponse = await fetch(`http://www.giantbomb.com/api/platforms?api_key=${apiKey}&format=json&field_list=name,id`);
const response = await rawResponse.json();
// check response.error === "OK" && repsonse.status_code === 1
return response.results;
}
@forksofpower
forksofpower / The Technical Interview Cheat Sheet.md
Last active January 27, 2017 04:07 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@forksofpower
forksofpower / cloud-config.yml
Created September 21, 2016 05:35 — forked from socketwiz/cloud-config.yml
CoreOS cloud-config for DigitalOcean with iptables firewall
#cloud-config
coreos:
etcd2:
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3
# specify the initial size of your cluster with ?size=X
discovery: https://discovery.etcd.io/<token>
# multi-region and multi-cloud deployments need to use $public_ipv4
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
@forksofpower
forksofpower / README.md
Created August 9, 2016 07:22 — forked from learncodeacademy/README.md
Running a High Availability Service on CoreOS using Docker, Fleet, Flannel, Etcd, Confd & Nginx

Running a High Availability Service on CoreOS using Docker, Fleet, Flannel, Etcd, Confd & Nginx

Tools used:

  • coreos: server machine clustering via a shared cloud-config.yml
  • etcd: key value store for service registration and discovery
  • fleet: scheduling/failover of docker containers across coreos cluster
  • flannel: Gives each docker container a unique ip that allows you to access the internal port (i.e. port 80 not 32679)
  • confd: watch etcd for nodes arriving/leaving - template nginx configuration files / reload nginx on change
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker -y
# Install fig
sudo sh -c "curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig"
sudo chmod +x /usr/local/bin/fig

found at: http://fascinated.fm/post/2379188731/getting-a-motorola-sbg6580-into-bridge-mode-on

Getting a Motorola SBG6580 into “Bridge” mode on TimeWarner Wideband

  1. Unplug coax cable from Motorola
  2. Hold down the white reset button on the back panel with a pen for 30s.  This resets all settings to factory defaults. The modem will be auto-reconfigured once you plug in the coax cable.
  3. When modem is back on plug in a computer with an Ethernet cable into the modem.
  4. Connect to http://192.168.0.1 and login with “admin” / “motorola”
  5. Now you will make some changes:
 
  • Wireless -> Primary Network -> Disabled