Skip to content

Instantly share code, notes, and snippets.

View wsrast's full-sized avatar
💭
Full Stack JavaScript

Wesley Rast wsrast

💭
Full Stack JavaScript
  • Atlanta, GA
View GitHub Profile
@wsrast
wsrast / Terminal output semaphore docker
Created November 10, 2020 21:50
Terminal output semaphore docker
semaphore@semaphore-vm:~/platform$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.9G 0 7.9G 0% /dev
tmpfs 1.6G 6.5M 1.6G 1% /run
/dev/mapper/semaphore--vm--vg-root 45G 30G 15G 68% /
tmpfs 7.9G 0 7.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
tmpfs 512M 0 512M 0% /run/shm
/dev/vda1 236M 113M 111M 51% /boot
@wsrast
wsrast / init.vim
Created May 14, 2020 19:00
nvim settings
set history=700
set nocp
color delek
syntax on
set autoindent
set backup
set backupdir=~/vim/tmp
set bg=dark
set clipboard=unnamedplus
set cmdheight=2
@wsrast
wsrast / SketchSystems.spec
Created March 10, 2020 17:40
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State
@wsrast
wsrast / scraper.js
Last active May 2, 2019 20:29
Bitbucket web page scraper for repositories
JSON.stringify(Array.from(document.querySelectorAll('[data-repository-id]')).map(aTag => {
const href = aTag.getAttribute('href');
let projName = href.match(/\/projects\/(.+)\/repos/)[1].toLowerCase();
let repoName = href.match(/\/repos\/(.+)\/browse/)[1];
repoName = repoName.replace(' ', '-');
const templ = `https://${location.host}/scm/${projName}/${repoName}.git`;
return {
href,
name: aTag.innerText,
clone: templ
@wsrast
wsrast / Enhanced.js
Last active December 18, 2018 19:10
A base HOC pattern
import React from "react";
import { withHandlers, withState, compose } from "recompose";
const RenderComponent = ({ handleClick, stateValue, newValue }) => {
return (
<button onClick={handleClick}>
RenderComponent ({stateValue.value} clicks!)
</button>
);
};
@wsrast
wsrast / index.js
Created November 16, 2018 17:27
Simple React functional component (super meaty)
import React from 'react';
import PropTypes from 'prop-types';
const Functional3 = props => {
return (
<div>
Hello from Functional3 and {props.name}!
</div>
)
};
@wsrast
wsrast / index.js
Last active November 16, 2018 15:51
Simple React functional component (meatier)
import React from 'react';
const Functional2 = props => {
return (
<div>
Hello from Functional2 and {props.name}!
<br/>
this: {this}
</div>
)
@wsrast
wsrast / index.js
Created November 16, 2018 15:30
Simple React functional component
const Functional = props => <div>This is a Functional component!</div>;
@wsrast
wsrast / index.html
Created July 24, 2017 14:57
JS Bin Adding scripts to an interior iframe through src attribute and/or DOM access // source http://jsbin.com/vijupoy
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Adding scripts
to an interior iframe through
src attribute and/or DOM access">
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width">
<title>JS Bin</title>
@wsrast
wsrast / data.json
Last active May 9, 2017 13:28
Overwatch Pharmercy Calculator
{
"shooters": {
"Bastion (recon)": {
"dmgFalloffStart": 26,
"dmgFalloffEnd": 50,
"magSize": 25,
"maxShotDmg": 20,
"minShotDmg": 6,
"reloadTime": 2.0,
"shotsPerSec": 8