Skip to content

Instantly share code, notes, and snippets.

View gist:589301c92a4ce33487f7feb511eb0d28

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
View index.html
<!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
View gist:d546b69806ffa56351b20ed9ff3e1139
// more useful to replace this list with the weak character list.
str.replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g,"");
@miketoth
miketoth / selenium_test.java
Last active Apr 4, 2017
Selenium Test Java
View 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 Mar 27, 2017
var --> let
View sed
# for macs
sed -i '' 's/var/let/g' js/**/*.js
@miketoth
miketoth / .eslintrc.js
Last active Jan 25, 2017 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
View .eslintrc.js
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
View keybase.md

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 Jun 30, 2018
TURN DOWN FOR WHAT MAC ONLY SORRY
View turn-down.sh
#!/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 Dec 7, 2017 — forked from snit-ram/hipchat-giphy
Giphy on hipchat (no integration needed)
View hipchat-giphy
(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);
}