Skip to content

Instantly share code, notes, and snippets.

View chevy_rolls.txt
// Seventh Seraph Officer Revolver
jasonwarta / set_envs.ps1
Created Feb 27, 2019
Load .env on Windows
View set_envs.ps1
foreach($line in Get-Content docker.env) {
$new_env_var = "`$env:" + $line.replace('=', ' = "') + '"'
Invoke-Expression $new_env_var
jasonwarta / cloudSettings
Last active Feb 8, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
jasonwarta / cloudSettings
Last active Feb 8, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
jasonwarta /
Last active Jan 6, 2019
script for migrating a git repo between services
# 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
function migrate-repo() {
jasonwarta / App.js
Created Jan 2, 2019 — forked from shelldandy/App.js
nprogress with react-router in create-react-app
View App.js
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 =>
{, i) =>
<FancyRoute key={i} {...route} />
jasonwarta / cloudSettings
Last active Jan 28, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
# run from the root of a directory with multiple projcts to see the status of all of them
# requires the program be located at the root of your home directory
FILES=`find . -maxdepth 1 -type d`
. ~/
while read line; do
View textarea-autoextend.js
window.onload = function(){
function textAreaAdjust(o) {
var elem =; = "1px"; = (10+elem.scrollHeight)+"px";
var elems = document.getElementsByTagName('textarea');
for(var ii=0;ii<elems.length;ii++){
View smoothScroll.js
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;