Skip to content

Instantly share code, notes, and snippets.

View johncokos's full-sized avatar
🏠
Working from home

John Cokos johncokos

🏠
Working from home
View GitHub Profile
@johncokos
johncokos / media-query.css
Created October 18, 2018 20:24 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@johncokos
johncokos / .wsl
Last active September 15, 2019 00:32
# Nothing below here will change how your terminal looks, rather, it will change some things about how it works.
# This allows you to open html files in Chrome more easily by typing "chrome filename".
alias chrome="/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe"
# set -o vi
# This allows you to switch between the Ubuntu root and your Windows Root.
WINDOWS_USER=$(/mnt/c/Windows/System32/cmd.exe /c 'echo %USERNAME%' | sed -e 's/\r//g')
@johncokos
johncokos / .gitprompt
Last active September 15, 2019 00:33
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
fi
#!/bin/bash
curl https://gist.githubusercontent.com/johncokos/66fad129ce3493d079755f83c4360e9f/raw/0b21422bdaf26923dd3c8686cb4aacec11817bbd/.wsl --output .wsl
curl https://gist.githubusercontent.com/johncokos/d1376b366f388523d7b446e11a91868e/raw/11133073c12ac5cf737bebaa3745a5fc066b3e82/.gitprompt --output .gitprompt
echo "source ~/.gitprompt" >> ~/.bashrc
echo "source ~/.wsl" >> ~/.bashrc
## Update APT
sudo apt get update
import {createStore, applyMiddleware} from 'redux';
import reporter from '../reporter';
// Simulate an error or simulate something good just return statel
let mockStore = () => {
let reducer = (state=0, action) => {
let {type,payload} = action;
switch(type) {
case "ERROR":
throw new Error("WAT?");
@johncokos
johncokos / launch.json
Created April 22, 2020 05:49
VSC Debuggers
{
"version": "1.0.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Nodemon: Current File",
"cwd": "${fileDirname}",
"runtimeExecutable": "nodemon",
"args": [],
@johncokos
johncokos / settings.json
Created April 22, 2020 05:49
VSC settings.json
{
"spellright.language": [
"en"
],
"spellright.documentTypes": [
"markdown",
"latex",
"plaintext",
"wallaby-output",
"html"
@johncokos
johncokos / index.html
Created February 19, 2024 20:03
Code 201 Lab 01
<!DOCTYPE html>
<html>
<head>
<title>About John</title>
<style>
body {
background: #eee;
}
header {
background: #444;