Skip to content

Instantly share code, notes, and snippets.

View bluetidepro's full-sized avatar
🍕
🐺

Zach Reed bluetidepro

🍕
🐺
View GitHub Profile
@impressiver
impressiver / raven-config.html
Last active February 27, 2024 14:27
Raven.js configuration for logging JavaScript exceptions to Sentry (https://getsentry.com/). Without the added ignore options, you'll quickly find yourself swamped with unactionable exceptions due to shoddy browser plugins and 3rd party script errors.
<!-- Raven.js Config -->
<script src="{{ JS_PATH }}/lib/raven.js" type="text/javascript"></script>
<script type="text/javascript">
// Ignore list based off: https://gist.github.com/1878283
var ravenOptions = {
// Will cause a deprecation warning, but the demise of `ignoreErrors` is still under discussion.
// See: https://github.com/getsentry/raven-js/issues/73
ignoreErrors: [
// Random plugins/extensions
'top.GLOBALS',
@ellerrs
ellerrs / gist:4989962
Last active December 13, 2015 23:09
proposed product schema
var ProductSchema = new Schema({
categoryId: String
, department: String
, ean: String
, model: String
, weight: String
, dimensions: {
height: String
, width: String
, length: String
anonymous
anonymous / scratchpad.js
Created December 17, 2012 19:29
$(function(){
// Scratchpad Intro
//--------------------------------------------------------------------------------
var intro =
['<style>',
' body {background: #DDD6B2;}',
' .container {',
' background: #fff;',
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@nijikokun
nijikokun / example-user.js
Created May 3, 2012 20:46
Beautiful Validation... Why have I never thought of this before?!
var user = {
validateCredentials: function (username, password) {
return (
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' }
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' }
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' }
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' }
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' }
: false
);
@bluetidepro
bluetidepro / social_stuff.php
Created February 15, 2012 17:31 — forked from srcoley/social_stuff.php
Social Stuff
<?php
/*
* Plugin Name: Social Stuff
* Description: Allows users to befriend or follow one-another. Also tracks events such as commemts and follows so they they can be displayed in an activity feed.
* Version: 0.1
* Author: Stephen Coley
* Author URI: http://coley.co
* License: GPL2
*
*
@Victa
Victa / gist:1209370
Created September 11, 2011 09:13
Font sizing with REM and PX (LESS)
// ABOUT
A simple LESS (http://lesscss.org) snippet based on http://snook.ca/archives/html_and_css/font-size-with-rem
It doesn't do much but saves you typing things twice, allowing you to use rem as a unit for font-sizes
and giving a px fallback for IE
// MIXIN
.font-size(@font-size: 16){
@rem: (@font-size / 10);
font-size: @font-size * 1px;
font-size: ~"@{rem}rem";
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt