Skip to content

Instantly share code, notes, and snippets.

View dhigginbotham's full-sized avatar
😸
happycat

David Higginbotham dhigginbotham

😸
happycat
View GitHub Profile
@elie222
elie222 / my-vs-code-snippets.json
Last active June 17, 2025 01:46
Favourite VS Code Snippets
{
"Export default": {
"scope": "javascript,typescript,javascriptreact,typescriptreact",
"prefix": "eid",
"body": [
"export { default } from './${TM_DIRECTORY/.*[\\/](.*)$$/$1/}'",
"$2"
],
"description": "Import and export default in a single line"
},
@jancurn
jancurn / proxy-chain-example.js
Last active February 29, 2024 07:26
Example showing how to use the proxy-chain NPM package to let headless Chrome use a proxy server with username and password
const puppeteer = require('puppeteer');
const proxyChain = require('proxy-chain');
(async() => {
const oldProxyUrl = 'http://bob:[email protected]:8000';
const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);
// Prints something like "http://127.0.0.1:45678"
console.log(newProxyUrl);
@matthewjberger
matthewjberger / instructions.md
Last active June 20, 2025 13:09
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@jakebathman
jakebathman / StateBoundaries.sql
Last active May 29, 2025 19:15
The approximate max/min latitude and longitude for all states and major territories
-- Create the table
CREATE TABLE IF NOT EXISTS `StateBoundaries` (
`State` varchar(10) DEFAULT NULL,
`Name` varchar(255) DEFAULT NULL,
`MinLat` varchar(50) DEFAULT NULL,
`MaxLat` varchar(50) DEFAULT NULL,
`MinLon` varchar(50) DEFAULT NULL,
`MaxLon` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@dungmanh88
dungmanh88 / backup_collection_mongo.sh
Last active June 20, 2025 02:33
Dump multiple collections of a db in mongodb
#!/bin/bash
db=<db>
collection_list="<collection1> <collection2> <collection3>"
host=127.0.0.1
port=<port>
out_prefix=/Temp
for collection in $collection_list; do
echo $collection
out_dir="${out_prefix}/${db}_${collection}/"
javascript:!function(){function t(t,r){return t/r}function r(r,n){return t(r,n)*r}function n(){var n=window.prompt("Voltage?",4.2),o=window.prompt("Ohms?",.2);if(isNaN(n)&&(n=parseInt(n)),isNaN(o)&&(o=parseInt(o)),n&&o){var i="Stats:\r";i+="Amps: "+t(n,o).toFixed(2)+"\r",i+="Ohms: "+o+"\r",i+="Volts: "+n+"\r",i+="Watts: "+r(n,o).toFixed(2)+"\r",window.alert(i)}}n()}();
@justsml
justsml / setup-docker.md
Last active May 4, 2020 17:25
Docker Setup for Server Host, DB Instances, and NodeJS App

Docker Host Server Setup, w/ Basic Monitoring Tools

# Updates
apt-get update && apt-get install -y vim-nox git-core ufw curl atop htop build-essential libssl-dev linux-image-amd64 linux-headers-amd64

# Updates Profile init scripts
cd ~/
curl -sSL https://gist.githubusercontent.com/justsml/b667f158731fd054cd38/raw/5778dbb5d3d138ccf99ae1bf973457ce89661362/.bash_aliases > .bash_aliases_new
cat .bash_aliases_new >> .bash_aliases
@kamermans
kamermans / configure_docker0.sh
Last active December 29, 2024 12:44
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the
# Docker daemon using a JSON config file. On Linux, this file is normally located at
# /etc/docker/daemon.json. You should use this JSON config method if you are running
# a version of Docker that is at least 1.10!
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24:
# {
# "bip": "192.168.254.1/24"
# }
@IOExceptional
IOExceptional / async.html
Created February 1, 2015 06:30
Asynchronous JavaScript is a lie!
<html>
<head>
<title>JsTestBed</title>
</head>
<body>
<h2>"Async" test</h2>
<p>
In JavaScript, asynchronous calls are a lie!<br />
What actually happens is the setTimeout(func, 0); gets put on the end of the call list.<br />
Any direct javascript functions will get prioritised and run before the function in the timeout.
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 12, 2025 16:46
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?