Skip to content

Instantly share code, notes, and snippets.

View coogie's full-sized avatar
👻
Spooked ya!

Stephen Coogan coogie

👻
Spooked ya!
View GitHub Profile
@coogie
coogie / input.scss
Created September 26, 2023 13:57
Generated by SassMeister.com.
$something: #900;
.foo {
background: var(--bg, $something);
}
.interpolated {
--bg: #{$something};
}

Dojo CountdownClock Component

Begin by scaffolding out the guts of our component

By default, Fractal gives us a lot of boilerplate to show how components are built out within the Monorepo. For the purpose of today's Dojo, we're gonna rewrite much of this component, so let's just get the skeleton.

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
@coogie
coogie / idid.sh
Last active October 23, 2015 13:41
A bash command for re-running git command typos with their intended command
function rerun() {
passedParams=($@)
heldParams=${passedParams[@]:2}
declare last=''
while [[ $# > 0 ]]; do
last="$last $1"
shift
done
@coogie
coogie / pre-commit
Created July 16, 2015 11:08
A pre-commit hook to catch filename conflicts because hurr durr Windows
#!/bin/bash
# Save current state
git stash -u -q --keep-index || exit 1
# Get the list of clashing files in the whole repository
CLASHING=`find "$(git rev-parse --show-toplevel)" | sort | uniq -d -i`
# Restore previous state
git stash pop -q
@coogie
coogie / uptime.sh
Created October 17, 2014 08:19
I need a better hobby...
#!/bin/bash
length=$(uptime | awk '{print $3}' | sed 's/,//g')
printf '8'
for (( i = 1; i <= $length; i++ ))
do
printf '='
done
echo 'D'

Keybase proof

I hereby claim:

  • I am coogie on github.
  • I am coogie (https://keybase.io/coogie) on keybase.
  • I have a public key whose fingerprint is ECCE E55D A3C0 A891 5D34 1617 E86D A2E4 71C0 D4D8

To claim this, I am signing this object:

@coogie
coogie / index.html
Last active March 23, 2018 09:44
PoC for getting a user's current location, and adding markers to a Google Map whose information is retrieved via API call
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Create markers on GMap from XHR</title>
<style>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map-canvas { height: 650px }