Skip to content

Instantly share code, notes, and snippets.

Current Name Proposed Name
addCard.js workspaceCardAdd.js
confirmEmail.js userEmailConfirm.js
createDeployment.js deploymentCreate.js
createDeploymentSA.js deploymentSACreate.js
createToken.js userTokenCreate.js
createUser.js userCreate.js
createWorkspace.js workspaceCreate.js
createWorkspaceSA.js workspaceSACreate.js
@ryanahamilton
ryanahamilton / spacing-utils.scss
Created October 25, 2019 13:18
Spacing Utility Classes
// --------------------------------------------------------
// margin/padding utilities
// Generates spacing classes that look like this:
// .u-[m|p][|x|y|t|r|b|l][0|1|2|3|4|5|6|7|8]
//
// m = margin
// p = padding
// x = left and right
// y = top and bottom
// t, r, b, l = top left bottom right
// @flow
import React, { type StatelessFunctionalComponent } from 'react';
import gql from 'graphql-tag';
import { Query } from 'react-apollo';
import { Badge } from '~/public/shared/components';
const STATUS_COUNT_QUERY = gql`
query sellerItemStatusCounts($contractId: ID) {
sellerItemStatusCounts(contractId: $contractId) {
// @flow
const formatThousandsToK = (val: number | string | null): string => {
const num = Number(val) || 0;
const absNum = Math.abs(num);
const signNum = Math.sign(num);
if (absNum > 999) {
const reduced = signNum * (absNum / 1000);
return `${reduced.toFixed(1)}k`;

Keybase proof

I hereby claim:

  • I am ryanahamilton on github.
  • I am ryanahamilton (https://keybase.io/ryanahamilton) on keybase.
  • I have a public key whose fingerprint is F682 CCD9 F360 833F 3003 863D E8B5 B653 9F42 4A8B

To claim this, I am signing this object:

@ryanahamilton
ryanahamilton / After
Created October 28, 2013 20:27
SASS Hash as workaround for not being able to interpolate variable names.
a {
display: block;
width: 60px;
height: 60px;
line-height: 70px;
text-align: center;
font-size: 30px;
color: #fff;
@include transition(background-color 0.3s);
@ryanahamilton
ryanahamilton / gist:4332324
Last active December 9, 2015 21:39
Preferences.sublime-settings
{
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme",
"find_selected_text": true,
"bold_folder_labels": true,
"folder_exclude_patterns":
[
".git",
".sass-cache"
],
"font_face": "Source Code Pro",
http://username:password@www.example.com:443/path/file.name?query=string#anchor
|_____||______| |______| |_____________| |_||_____________||___________||_____|
   |       |       |           |          |         |             |         |
scheme   user   password      host       port      path         query   fragment
|______________________________________________________________________________|
                                       |

url

function Person(name){
this.name = name;
}
Person.prototype.getName = function() {
return this.name;
}
var thomas = new Person('Thomas');
var amy = new Person('Amy');
var countdown = (function() {
var index;
function log(){
console.log(index);
}
function iterate(){
log();
if(index>1) setTimeout(iterate, 1000);