Skip to content

Instantly share code, notes, and snippets.

@miketoth
miketoth / gist:589301c92a4ce33487f7feb511eb0d28
Created May 28, 2019 23:23
keep fork up to date with remote

1. Add original repo as an upstream remote

git remote add upstream git@github.com/ORIGINAL/REPO-YOU-FORKED.git
git fetch upstream

2. Pull in their changes

git pull upstream master

@miketoth
miketoth / index.html
Created December 17, 2018 21:46
LastingGrandioseHypotenuse created by miketoth - https://repl.it/@miketoth/LastingGrandioseHypotenuse
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div>1
// more useful to replace this list with the weak character list.
str.replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g,"");
@miketoth
miketoth / selenium_test.java
Last active April 4, 2017 18:48
Selenium Test Java
package com.way2b1.examples;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.Wait;
import org.openqa.selenium.support.ui.WebDriverWait;
public class GoogleSearch {
@miketoth
miketoth / sed
Created March 27, 2017 22:32
var --> let
# for macs
sed -i '' 's/var/let/g' js/**/*.js
@miketoth
miketoth / .eslintrc.js
Last active January 25, 2017 22:03 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],

Keybase proof

I hereby claim:

  • I am miketoth on github.
  • I am miketoth (https://keybase.io/miketoth) on keybase.
  • I have a public key whose fingerprint is 63A4 86FD 43EA 3590 462C 8642 F046 0923 82E8 C243

To claim this, I am signing this object:

@miketoth
miketoth / turn-down.sh
Last active June 30, 2018 16:19
TURN DOWN FOR WHAT MAC ONLY SORRY
#!/bin/bash
VOL=$(osascript -e "output volume of (get volume settings)")
NEWVOL=0
while true
do
if (($VOL == $NEWVOL)); then
$(osascript -e "set volume output volume 100")
echo $(osascript -e "output volume of (get volume settings)")
@miketoth
miketoth / hipchat-giphy
Last active December 7, 2017 20:50 — forked from snit-ram/hipchat-giphy
Giphy on hipchat (no integration needed)
(function () {
function giphy(word, callback) {
var xhr = new XMLHttpRequest();
var url = 'https://api.giphy.com/v1/gifs/translate?rating=pg-13&api_key=dc6zaTOxFJmzC&s=' + encodeURIComponent(word);
xhr.open('GET', url);
xhr.onreadystatechange = function(e) {
if(xhr.readyState === 4) {
var url = JSON.parse(e.target.responseText).data.images.fixed_height.url;
callback(url);
}