Skip to content

Instantly share code, notes, and snippets.

View TexRx's full-sized avatar
🏠
Working from home

Bobbie Tables TexRx

🏠
Working from home
View GitHub Profile
@TexRx
TexRx / SassMeister-input.scss
Created December 16, 2016 18:05
Precise control over responsive typography for Sass
// ----
// libsass (v3.3.6)
// ----
// =========================================================================
//
// PRECISE CONTROL OVER RESPONSIVE TYPOGRAPHY FOR SASS
// ---------------------------------------------------
// Indrek Paas @indrekpaas
//
var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var libs = ["underscore", "jquery"];
gulp.task("vendor", function () {
var b = browserify();
libs.forEach(function (lib) {
@TexRx
TexRx / gulpfile.js
Last active August 29, 2015 14:26 — forked from PiiXiieeS/gulpfile.js
expressjs-nodemon-browsersync
'use strict';
var gulp = require('gulp'),
browserSync = require('browser-sync'),
nodemon = require('gulp-nodemon');
// we'd need a slight delay to reload browsers
// connected to browser-sync after restarting nodemon
var BROWSER_SYNC_RELOAD_DELAY = 500;
@TexRx
TexRx / gist.md
Last active August 29, 2015 14:22 — forked from benbalter/gist.md

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

/*
* This decorates Handlebars.js with the ability to load
* templates from an external source, with light caching.
*
* To render a template, pass a closure that will receive the
* template as a function parameter, eg,
* T.render('templateName', function(t) {
* $('#somediv').html( t() );
* });
* Source: https://github.com/wycats/handlebars.js/issues/82
/**
* BrowserSync config: serve static assets, and proxy the HTML
*
* Let's say we have the codebase for the front-end of a website,
* and we want to develop CSS/JS or debug against the HTML of
* a remote development, staging or production server.
*
* Using BrowserSync (2.4 needed), we want to serve to our browser(s):
* - the distant HTML pages and content images from the server
* - local static assets (including or changes)
@TexRx
TexRx / osx-setup.md
Last active August 29, 2015 14:16 — forked from zenorocha/.hyper.js

Setup Mac OS X

I'm in a hospital in Spain and my MacBook was stolen.

Hospital Commit

Now I bought a new one and need to configure it. I have an external hard drive that backup everything using Time Machine, but I don't want all the crap I had in the old one.

1. Run Software Update

@TexRx
TexRx / lazypipe.js
Last active August 29, 2015 14:16 — forked from OverZealous/lazypipe.js
var combine = require('stream-combiner');
function lazypipe() {
var createPipeline = function(tasks) {
var build = function() {
return combine.apply(null, tasks.map(function(t) {
return t.task.apply(null, t.args);
}));
};
build.pipe = function(task) {
//<editor-fold desc="Node Requires, gulp, etc">
var gulp = require('gulp'),
autoprefixer = require('gulp-autoprefixer'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
csso = require('gulp-csso'),
debug = require('gulp-debug'),
footer = require('gulp-footer'),
gutil = require('gulp-util'),
gzip = require('gulp-gzip'),
@TexRx
TexRx / lcd.js
Last active August 29, 2015 14:16 — forked from haugstrup/lcd.js
// Wire up LCD as described here:
// http://learn.adafruit.com/character-lcds/overview
var five = require("johnny-five"),
board, lcd;
board = new five.Board();
board.on("ready", function() {