Skip to content

Instantly share code, notes, and snippets.

@poeticninja
poeticninja / link-fancy-underline.css
Created October 4, 2018 14:47
Fancy Link Underline Animation
@poeticninja
poeticninja / business-planning.md
Last active August 1, 2018 18:16
Business Planning

Vision

Big picture idea of what you want to achieve.

Mission Statement

General statement of how you will achieve your vision. There is a very close relationship between the vision and mission. The mission is an action statement that usually begins with the word “to”. Once again it is a very simple and direct statement that is easy to understand and remember.

Core Values

Core values define the business in terms of the principles and values that the business leaders will follow. They provide the bounds or limits of how the business leaders will conduct their activities while carrying out the vision and mission.

Goals

@poeticninja
poeticninja / promise.serial.waterfall.js
Created May 10, 2017 20:00
Example serial promises with error to handle individual cases.
const delay = require("delay");
const people = [
{
id: 0,
name: "Stewie",
delay: 200
},
{
id: 1,
@poeticninja
poeticninja / ComponentWidth.js
Last active March 21, 2017 23:44
React component width decorator.
import React from "react";
import elementResizeEvent from "element-resize-event";
export default (Component) => {
class ComponentWidth extends React.Component {
state = {
width: 0,
};
componentDidMount() {
const element = this.targetElement;
@poeticninja
poeticninja / _spacing.scss
Last active February 24, 2017 22:55
Spacing for styles
@mixin spacing($prop: padding, $dir: top, $value: 1) {
#{$prop}-#{$dir}: $value;
}
@function initial($string) {
@return str-slice($string, 0, 1);
}
$properties: (
margin,
@poeticninja
poeticninja / generate-uuid.js
Last active June 5, 2019 20:09
GenerateUUID
function generateUUID(n) {
return n ? (n ^ 16 * Math.random() >> n / 4).toString(16) : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, generateUUID)
}
@poeticninja
poeticninja / .bash_profile
Created October 11, 2016 19:10
Bash Profile - 10/11/2016
# Easier navigation: .., ..., ~ and -
alias ..="cd .."
alias cd..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias -- -="cd -"
## Use a long listing format ##
alias ll='ls -la'
@poeticninja
poeticninja / docker-cache-experimental.sh
Created October 7, 2016 18:54
docker cache experimental semaphore
#!/usr/bin/env bash
image_archive="image-archive.tar"
image_metadata="docker-image-metadata.tar.gz"
function cache_images() {
images_to_cache=$(docker images | awk '{print $3}' | grep -v '<none>' | tail -n +2 | while read line; do docker history -q $line | grep -v '<missing>'; done | uniq)
if [ -n "$images_to_cache" ]; then
printf "Saving the following images:\n$images_to_cache\n\n"
@poeticninja
poeticninja / keymap.cson
Created July 17, 2016 02:39
Atom JSX Emmet Support. Escape if autocomplete shows up and then tab for emmet.
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@poeticninja
poeticninja / .bash_profile
Last active March 22, 2016 17:53
Bash Profile Base
# Easier navigation: .., ..., ~ and -
alias ..="cd .."
alias cd..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias -- -="cd -"
## Use a long listing format ##
alias ll='ls -la'