Skip to content

Instantly share code, notes, and snippets.

View billpull's full-sized avatar

Bill Pullen billpull

  • ParlayPlay
  • Miami, FL
View GitHub Profile
@billpull
billpull / main.js
Created April 3, 2014 05:35
Twitter Message Count With Shortened Links
/* Character Count for Posts */
function checkPostForURL(post){
var matches = [],
urlexp = new RegExp("(^|[ \t\r\n])((http|https):(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?([A-Za-z0-9$_+!*();/?:~-]))","g"),
$linkShort = $('#linkstoshort'),
matchIdx = 0;
if ( post !== undefined ){
if ( urlexp.test(post) ){
var offset = 0;
@billpull
billpull / Layer to Sprite.jsx
Last active August 29, 2015 14:02 — forked from jessefreeman/layers_to_sprite_sheet.js
Create vertical sprite in photoshop
// Put this file in Program Files\Adobe\Photoshop\Presets\Scripts\
// In PhotoShop menu File > Automate > Scripts: layersToSprite.js
// Arrange layers into a sprite sheet.
if (documents.length > 0)
{
// --------------------------
docRef = activeDocument;
@billpull
billpull / SassMeister-input.scss
Created July 21, 2014 18:39
Generated by SassMeister.com.
// ----
// libsass (v2.0.0)
// ----
%Placeholder1 {
color: red;
}
%Placeholder2 {
background: black;
@billpull
billpull / SassMeister-input.scss
Created April 7, 2015 21:34
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
/*CUSTOM*/
body{
#HeaderBar {
background: none;
margin-bottom: 0;
@billpull
billpull / font-face.css
Created April 9, 2015 22:21
Font Face Formatting
@font-face {
font-family: 'eagle-bookregular';
src: url('/fonts/WW/EAGLBK.eot');
src: url('/fonts/WW/EAGLBK.eot?#iefix') format('embedded-opentype'),
url('/fonts/WW/EAGLBK.woff2') format('woff2'),
url('/fonts/WW/EAGLBK.woff') format('woff'),
url('/fonts/WW/EAGLBK.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
@billpull
billpull / components.user-comment.js
Created July 27, 2015 19:42
Share Actions Outlet
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
renderTopLevel: function () {
this.sendAction('renderTopLevel');
},
renderPost: function () {
this.sendAction('renderPost');
}
{{x-toggle}}
{{ -- display logic for hours }}
{{/x-toggle}}
@billpull
billpull / ember-cli-build.js
Last active November 16, 2015 16:46
Ember Build Script for Separating Pods
/* global require, module */
var stew = require('broccoli-stew');
var concat = require('broccoli-concat');
var Funnel = require('broccoli-funnel');
var replace = require('broccoli-string-replace');
var mergeTrees = require('broccoli-merge-trees');
var esTranspiler = require('broccoli-babel-transpiler');
var HtmlbarsCompiler = require('ember-cli-htmlbars');
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
@billpull
billpull / index.js
Created December 8, 2015 07:05
nightmarescript.js
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var log = require('verbalize');
var yaml = require('js-yaml');
var Nightmare = require('nightmare');
var Promise = require('q').Promise;
var argv = require('minimist')(process.argv.slice(2));
@billpull
billpull / index.js
Last active May 25, 2016 03:32
In Repo Addon Move & Remove Routes
/*jshint node:true*/
var stew = require('broccoli-stew');
var Funnel = require('broccoli-funnel');
var BroccoliMergeTrees = require('broccoli-merge-trees');
var OPTIONAL_ROUTES = [
'optional-1',
'optional-2'
];