Skip to content

Instantly share code, notes, and snippets.

View gandhiShepard's full-sized avatar

Benjamin Gandhi-Shepard gandhiShepard

View GitHub Profile
name: Test and Deploy
on: push
jobs:
test:
runs-on: ubuntu-18.04
strategy:
matrix:
otp: [23]
elixir: [1.11.4]
@gandhiShepard
gandhiShepard / domready-vanilla.js
Created September 30, 2015 20:29
DOM Ready vanilla JS
// DOMReady function
// Can't remember where I found this...
// I'll add attributes later
var domReady = function(callback) {
document.readyState === "interactive" || document.readyState === "complete" ? callback() : document.addEventListener("DOMContentLoaded", callback);
};
domReady(function() {
console.log( 'What up! This DOM is ready yo!' );
});
@gandhiShepard
gandhiShepard / react-filter-map-example.js
Created September 25, 2015 15:44
React .filter and .map example
// via: Learn Raw React — no JSX, no Flux, no ES6, no Webpack…
// http://jamesknelson.com/learn-raw-react-no-jsx-flux-es6-webpack
var contacts = [
{key: 1, name: "James Nelson", email: "[email protected]"},
{key: 2, name: "Bob"}
]
var listElements = contacts
.filter(function(contact) { return contact.email; })
/*
|--------------------------------------------------------------------------
| Browser-sync config file
|--------------------------------------------------------------------------
|
| Please report any issues you encounter:
| https://github.com/shakyShane/browser-sync/issues
|
| For up-to-date information about the options:
| https://github.com/shakyShane/browser-sync/wiki/Working-with-a-Config-File
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Post Process</title>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900,900italic,700italic,400italic,100italic">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,700">
doctype html
html
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1, maximum-scale=1')
title Post Process
link(rel='stylesheet', type='text/css', href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900,900italic,700italic,400italic,100italic')
link(rel='stylesheet', type='text/css', href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700')
link(rel='stylesheet', type='text/css', href='http://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,700')
@gandhiShepard
gandhiShepard / SassMeister-input.scss
Last active August 29, 2015 14:12
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
// Sass maps
// Map font weights for consistant usage across different fonts
$sans: (
face: 'source sans pro',
// Load plugins
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')({ camelize: true }),
lr = require('tiny-lr'),
server = lr();
// Styles
gulp.task('styles', function() {
return gulp.src('assets/styles/source/*.scss')
.pipe(plugins.rubySass({ style: 'expanded', compass: true }))
@gandhiShepard
gandhiShepard / SassMeister-input-HTML.html
Created November 30, 2014 20:53
Generated by SassMeister.com.
<p>lorem</p>
@gandhiShepard
gandhiShepard / SassMeister-input-HTML.html
Created November 23, 2014 12:14
Generated by SassMeister.com.
<div class="contain">
<div id="ponyo">
<h1>@include centerEl;</h1>
<p>With this SCSS mixin you'll be able to horizontally AND vertically center blocks of text dynamically, with ease</p>
</div>
</div>
<div class="contain">
<div id="billmurray">
<p>To use it, just <code>@include centerEl</code></p>