Skip to content

Instantly share code, notes, and snippets.

@banderson
banderson / remote-ui.md
Last active March 3, 2023 15:41
Remote UI discussion

Remote UI @ HubSpot

  • What we're building
  • Where remote-ui comes in
  • Our proposed architecture
  • Open questions







@banderson
banderson / gmail-github-filters.md
Created June 21, 2018 18:06 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:(notifications@github.com) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request

@banderson
banderson / github-project-cards.graphql
Created February 8, 2017 05:47
Fetch github project cards via graphql
{
repository(owner: "banderson", name: "life") {
projects(first: 30) {
totalCount
edges {
node {
name
number
url
columns(first: 30) {
@banderson
banderson / flipper
Last active December 20, 2015 11:39
Ruby Script to flip text
!/usr/bin/env ruby
# encoding: UTF-8
# adapted from http://www.leancrew.com/all-this/2009/05/im-feelin-upside-down/
class Flipper
CHARS = " abcdefghijklmnopqrstuvwxyz,.?!'()[]{}".split('')
FLIPPED_CHARS = " ɐqɔpǝɟƃɥıɾʞlɯuodbɹsʇnʌʍxʎz'˙¿¡,)(][}{".split('')
DICTIONARY = Hash[CHARS.zip FLIPPED_CHARS]
@banderson
banderson / mathHelpers.java
Created February 6, 2012 16:03
Math Helpers: Greatest Common Divisor & Least Common Multiple
public class MathHelper {
// Find the Greatest Common Divisor using Euclid's Algorithm
// Adapted from: http://en.wikipedia.org/wiki/Greatest_common_divisor#Using_Euclid.27s_algorithm
public static int GreatestCommonDivisor(int a, int b) {
// base case: when b is zero, we've found the GCD
if (b == 0) {
return a;
}
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
// answer
(foo)
? bar.doSomething(el)
/* inline-block */
#selector {
display: inline-block;
zoom: 1;
*display: inline;
}
/* min-width */
#selector {
min-width: 80px;
// TinyMCE Settings.
tinyMCE.init({
extended_valid_elements: 'style',
mode: 'exact',
elements: 'id_name',
theme: 'advanced',
theme_advanced_toolbar_location: 'top',
theme_advanced_toolbar_align: 'left',
plugins: 'safari, style, table, paste, media',
theme_advanced_buttons1: 'bold, italic, underline, justifyleft, justifycenter, justifyright, justifyfull, formatselect, fontselect, fontsizeselect',
//
// Automatically calls all functions in APP.init
//
jQuery(document).ready(function() {
APP.go();
});
//
// Module pattern:
// http://yuiblog.com/blog/2007/06/12/module-pattern/
@banderson
banderson / template.html
Last active August 29, 2015 14:10
Block Model Test Template
<!DOCTYPE HTML>
<html format=implicit>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="stylesheet" type="text/css" href="https://static.ctctcdn.com/galileo/images/templates/Galileo-Template-Images/GalileoExternalCSS.css">
<style>
table {