Skip to content

Instantly share code, notes, and snippets.

View chevy_rolls.txt
// Seventh Seraph Officer Revolver
dimwishlist:item=3037520408&perks=1840239774,1087426260,4071163871,2213355989
dimwishlist:item=3037520408&perks=1482024992,1087426260,4071163871,2213355989
dimwishlist:item=3037520408&perks=1840239774,106909392,4071163871,2213355989
dimwishlist:item=3037520408&perks=1482024992,106909392,4071163871,2213355989
dimwishlist:item=3037520408&perks=1840239774,1087426260,2010801679,2213355989
dimwishlist:item=3037520408&perks=1482024992,1087426260,2010801679,2213355989
dimwishlist:item=3037520408&perks=1840239774,106909392,2010801679,2213355989
dimwishlist:item=3037520408&perks=1482024992,106909392,2010801679,2213355989
dimwishlist:item=3037520408&perks=1840239774,1087426260,1354429876,2213355989
@jasonwarta
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
jasonwarta / cloudSettings
Last active Feb 8, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-02-08T00:28:27.890Z","extensionVersion":"v3.2.4"}
@jasonwarta
jasonwarta / cloudSettings
Last active Feb 8, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-02-08T00:28:07.434Z","extensionVersion":"v3.2.4"}
@jasonwarta
jasonwarta / migrate-git-repo.sh
Last active Jan 6, 2019
script for migrating a git repo between services
View migrate-git-repo.sh
# 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
@jasonwarta
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 =>
<Router>
<Switch>
{routes.map((route, i) =>
<FancyRoute key={i} {...route} />
@jasonwarta
jasonwarta / cloudSettings
Last active Jan 28, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-01-28T22:50:21.232Z","extensionVersion":"v3.2.4"}
View project_status.sh
#!/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
View textarea-autoextend.js
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++){
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;