Skip to content

Instantly share code, notes, and snippets.

@bobthecow
bobthecow / tab.bash
Last active November 10, 2023 08:47
Open new Terminal tabs from the command line
#!/bin/bash
#
# Open new Terminal tabs from the command line
#
# Author: Justin Hileman (http://justinhileman.com)
#
# Installation:
# Add the following function to your `.bashrc` or `.bash_profile`,
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc`
#
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@caseywatts
caseywatts / bookmarkleting.md
Last active July 12, 2024 15:27
Making Bookmarklets

This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.

@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active July 12, 2024 11:15
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@chapati23
chapati23 / create-kubernetes-cluster-on-aws.sh
Last active October 23, 2021 12:34
Setup script to create a fresh kubernetes cluster on AWS with kops incl. all required AWS resources (S3 buckets, IAM etc.)
#!/bin/bash
# Prerequisites (macOS):
# - aws cli => to create AWS resources
# => pip install --upgrade --user awscli
# => aws configure
# - jq => to parse JSON results returned by the AWS CLI
# => brew install jq
@lqdev
lqdev / main.js
Created January 3, 2018 04:56
Largest Unique Set of Characters
/*
write a program that outputs the largest unique set of characters that can be removed
from this paragraph without letting its length drop below 50.
For example: [‘H’, ‘i’, ‘!’, ‘ ’]
*/
//Exception based on paragraph length
function ParagraphLengthException(message){
this.name = "ParagraphLengthException"
this.message = message;