I hereby claim:
- I am jasonwarta on github.
- I am jasonwarta (https://keybase.io/jasonwarta) on keybase.
- I have a public key ASA8hJm9vgjvhgQCJ6ZxkxwgD1zyQ2JXRHtQn0I9V1LwUAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
git-init () { | |
# function that creates a git repo using the git API | |
# this function requires the following env variables to be set: | |
# GIT_USERNAME with your git username | |
# GIT_TOKEN with your git personal access token | |
# | |
# these are used when calling the api to create a new repo | |
# place the function code and env vars in your .bashrc or .profile |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function smoothScrollToTop(elemId) { | |
const speed = 1000; //ms | |
let targetY = document.querySelector(`#${elemId}`).offsetTop; | |
let curPos = window.scrollY; | |
let steps = 100; |
window.onload = function(){ | |
function textAreaAdjust(o) { | |
var elem = o.target; | |
elem.style.height = "1px"; | |
elem.style.height = (10+elem.scrollHeight)+"px"; | |
} | |
var elems = document.getElementsByTagName('textarea'); | |
for(var ii=0;ii<elems.length;ii++){ |
#!/bin/bash | |
# run from the root of a directory with multiple projcts to see the status of all of them | |
# requires the git-prompt.sh program be located at the root of your home directory | |
FILES=`find . -maxdepth 1 -type d` | |
BASE=`pwd` | |
. ~/.git-prompt.sh | |
while read line; do |
import React from 'react' | |
import { BrowserRouter as Router, Switch } from 'react-router-dom' | |
import routes from './routes' | |
import FancyRoute from './components/tools/FancyRoute' | |
const App = props => | |
<Router> | |
<Switch> | |
{routes.map((route, i) => | |
<FancyRoute key={i} {...route} /> |
# put this function in some file that will be loaded into your bash profile | |
# I personally use a dedicated sourced file for functions but it could also be placed | |
# in your .bashrc, .profile, or .bash_profile | |
# Usage: | |
# at a bash prompt, run | |
# migrate-repo <repo-url> | |
# the repo url could look like git@github.com:username/repo-name.git | |
function migrate-repo() { | |
new_repo_url=$1 |
{"lastUpload":"2019-01-28T22:50:21.232Z","extensionVersion":"v3.2.4"} |
{"lastUpload":"2019-02-08T00:28:07.434Z","extensionVersion":"v3.2.4"} |
{"lastUpload":"2019-02-08T00:28:27.890Z","extensionVersion":"v3.2.4"} |