Skip to content

Instantly share code, notes, and snippets.

Avatar
Brewing coffee

Abe Estrada AbeEstrada

Brewing coffee
View GitHub Profile
View regex-weburl.js
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@xtian
xtian / html5boilerplate.jade
Last active January 25, 2023 16:02
HTML5 Boilerplate in jade
View html5boilerplate.jade
!!! 5
html(class='no-js')
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
title
meta(name='description', content='')
meta(name='viewport', content='width=device-width, initial-scale=1')
@bentruyman
bentruyman / Custom.css
Created August 22, 2011 19:35
Tomorrow Theme for Chrome Developer Tools
View Custom.css
/**********************************************/
/*
/* Tomorrow Skin by Ben Truyman - 2011
/*
/* Based on Chris Kempson's Tomorrow Theme:
/* https://github.com/ChrisKempson/Tomorrow-Theme
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@robflaherty
robflaherty / csv-to-json.php
Created September 1, 2011 02:26
Convert CSV to JSON
View csv-to-json.php
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active February 23, 2023 08:36
How to publish packages to NPM
View how-to-publish-to-npm.md

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@allanlei
allanlei / .env
Created January 16, 2012 21:14
Sample local Heroku/Django development environment using foreman
View .env
DATABASE_URL=postgres://USERNAME:PASSWORD@127.0.0.1/DATABASE
MEMCACHE_SERVERS=127.0.0.1:11211
DJANGO_SETTINGS_MODULE=settings.development.local
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations
View gist:1630790

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@leon
leon / ssh-copy-rsub
Created March 2, 2012 10:04
ssh-copy-rsub - allows you to easily copy the remote script to your server using the same syntax as ssh-copy-id
View ssh-copy-rsub
#!/bin/sh -e
#
# Usage: ssh-copy-rsub [--bash] [user@]machine
#
# Shell script to install rsub on the remove server so we can open shell scripts locally.
# Author: Leon Radley (http://github.com/leon)
URL="https://raw.github.com/avian/rmate/master/rmate"
if [ "$#" -gt 1 ] || [ "$1" = "-b" ] || [ "$1" = "--bash" ]; then
@anthonyshort
anthonyshort / _media-queries.scss
Created March 13, 2012 10:37
Media Queries in Sass
View _media-queries.scss
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@maxparm
maxparm / is-21-years-old.js
Created April 9, 2012 17:56
JS - Is 21 Years Old?
View is-21-years-old.js
function is21YearsOld(date) {
var now = new Date();
var date = new Date(date);
var old = new Date(now.getFullYear()-21, now.getMonth(), now.getDate());
return date.getTime()<old.getTime();
}