Skip to content

Instantly share code, notes, and snippets.

View haydenbbickerton's full-sized avatar

Hayden Bickerton haydenbbickerton

  • 20:07 (UTC -05:00)
View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active June 18, 2024 18:27
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@klederson
klederson / HTML5StorageMultidimensional.js
Created October 8, 2012 18:23
Adding Multidimensional Support for javascript / html5 sessionStorage , localStorage or just Storage object
/**
*
* MOVED TO: https://github.com/iFind/html5MultidimensionalStorage
*
* This methods extends the default HTML5 Storage object and add support
* to set and get multidimensional data
*
* @example Storage.setObj('users.albums.sexPistols',"blah");
* @example Storage.setObj('users.albums.sexPistols',{ sid : "My Way", nancy : "Bitch" });
* @example Storage.setObj('users.albums.sexPistols.sid',"Other songs");
@mkhatib
mkhatib / geo.js
Created May 24, 2013 02:55
A Javascript utility function to generate number of random Geolocations around a center location and in a defined radius.
/**
* Generates number of random geolocation points given a center and a radius.
* @param {Object} center A JS object with lat and lng attributes.
* @param {number} radius Radius in meters.
* @param {number} count Number of points to generate.
* @return {array} Array of Objects with lat and lng attributes.
*/
function generateRandomPoints(center, radius, count) {
var points = [];
for (var i=0; i<count; i++) {
@floer32
floer32 / tupperware.py
Last active September 26, 2022 12:13
recursively convert nested dicts to nested namedtuples, giving you something like immutable object literals
from UserDict import IterableUserDict
import collections
__author__ = 'github.com/hangtwenty'
def tupperware(mapping):
""" Convert mappings to 'tupperwares' recursively.
@BrainlabsDigital
BrainlabsDigital / Heat Map Creation Tool.js
Last active January 5, 2024 08:04
Script to create smoothed heat maps from your AdWords data
/**
*
* Heat Map Creation Tool
*
* This script calculates the smoothed average performance of each hour of each day
* of the week, and outputs this into a heat map and graph in a Google sheet. It
* also makes suggested bid adjustments based on the conversion rate.
*
* Version: 1.1
* Updated 2016-10-11: removed 'ConvertedClicks'.
@srdjan
srdjan / 100+ different counter apps...
Last active May 6, 2024 05:13
100+ different js counter apps...
100+ different js counter apps...
@loopiezlol
loopiezlol / git-lambda.js
Created April 10, 2018 14:12
flow showing off how to clone, update and push to a git repo from an AWS lambda function
const fs = require('fs')
const path = require('path')
const process = require('process')
const { spawnSync } = require('child_process')
const { GITHUB_TOKEN, GITHUB_USERNAME, GITHUB_EMAIL } = process.env
// leaving this without https:// in order to reuse it when adding the remote
const gitRepositoryURL = 'github.com/owner/repo-name.git'
const repositoryName = 'repo-name'
<template>
<div>
<!-- v-row now provides gutter adjustments and has 3 options available -->
<!-- v1.5 - <v-container grid-list-xl> to v2.0 - regular (nothing required) -->
<!-- v1.5 - <v-container grid-list-md> to v2.0 - <v-row dense> -->
<!-- v1.5 - <v-container> to v2.0 - <v-row no-gutters> -->
<!-- v1.5 -->
<v-container grid-list-xl>
<v-layout>
@ttyler01
ttyler01 / Speedify-Setup.md
Last active May 7, 2024 22:40
These are the things I did to configure Speedify on my Raspberry Pi to bond 3 DSL modems for my house

Intro

Note: Verizon enabled LTE Home Internet in our area a while back and we switched immediately. The below setup was fun and instructive however we wasted no time dumping DSL. The whole-home VPN this provided - which you could still easily set up without all the multiplexing - was great but there were constant issues with streaming services trying to prevent revenue leakage.

I live in a semi-rural area and we have crap internet options. The ONLY wired service to my house is ATT DSL. In 2020 some of the neighbors convinced ATT to sell us business accounts, which allows us to have more than 1 DSL line to the house (we got 3). Rather than run multiple WiFi networks - one for each DSL modem - at my house I wanted to bond the lines and aggregate the bandwidth. ATT won't do this for you, even though the DSL modems support it.

@evan4
evan4 / Region.vue
Created August 6, 2021 16:16
Region
<template>
<div>
<h2 class="h2">Выберите ваш регион</h2>
<form class="mt-3" @submit.prevent="sendPhone" v-if="countries.length > 0">
<transition name="fade">
<div class="mb-3">
<label for="country" class="form-label">Страна</label>
<Multiselect
v-model="countryId"