This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jaredscheel.utils | |
{ | |
import flash.utils.Dictionary; | |
import flash.system.ApplicationDomain; | |
public class ClassManager | |
{ | |
public static const instance:ClassManager = new ClassManager(); | |
private var _classes:Dictionary = new Dictionary(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TEMPORARY TABLE IF EXISTS contact_report; | |
DROP TEMPORARY TABLE IF EXISTS contact_report_address; | |
DROP TEMPORARY TABLE IF EXISTS contact_report_group; | |
CREATE TEMPORARY TABLE contact_report_group SELECT gc.contact_id, GROUP_CONCAT(DISTINCT g.name ORDER BY g.name ASC SEPARATOR ", ") as groups FROM civicrm_group_contact gc LEFT JOIN civicrm_group g ON gc.group_id=g.id GROUP BY gc.contact_id; | |
CREATE TEMPORARY TABLE contact_report_address SELECT a.contact_id, a.street_address, a.city, a.postal_code, sp.abbreviation as state FROM civicrm_address a LEFT JOIN civicrm_state_province sp ON a.state_province_id=sp.id GROUP BY a.contact_id; | |
CREATE UNIQUE INDEX idx ON contact_report_address (contact_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), libxml = require('./libxmljs'); | |
var parser = new libxml.SaxPushParser(function(cb) { | |
var stack = []; | |
cb.onStartDocument(function() { | |
console.log('Starting to parse ...'); | |
}); | |
cb.onStartElementNS(function(elem, attrs, prefix, uri, namespaces) { | |
var obj = {}; | |
obj['@'] = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//needs to be expanded to include #fff and also needs to be more robust, but it's a start | |
$colorsString = shell_exec("grep -o -h '#......;' ./style.css | tr [A-Z] [a-z] | sort | uniq"); | |
$colors = array_filter(explode("\n", str_replace(array('#', ';'), '', $colorsString))); | |
header("Content-Type: image/png"); | |
$im = @imagecreate(210, 20 * count($colors)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# not perfect yet (env. not set properly, and still not 100% about the escaping) | |
import sublime, sublime_plugin | |
from subprocess import Popen, PIPE, STDOUT | |
import sublime, sublime_plugin | |
from subprocess import Popen, PIPE, STDOUT | |
class CoffeescriptToJsCommand(sublime_plugin.TextCommand): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
[ | |
{type: 'merlot'}, | |
{type: 'zinf'} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1, | |
"account_id": 3, | |
"wine_id": 646, | |
"qty": 12, | |
"format": "bottle", | |
"vintage": 1982, | |
"created_at": "2012-01-30T16:26:22Z", | |
"updated_at": "2012-01-30T16:26:22Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN GROOVE WIDGET CODE --> | |
<script id="grv-widget"> | |
/*<![CDATA[*/ | |
window.groove = window.groove || {}; groove.widget = function(){ groove._widgetQueue.push(Array.prototype.slice.call(arguments)); }; groove._widgetQueue = []; | |
groove.widget('setWidgetId', 'INSERT YOUR WIDGET ID HERE'); | |
groove.widget('setAutoload', false); | |
(function(){ | |
var loadEvent = 'turbolinks:load'; | |
var unloadEvent = 'turbolinks:before-visit'; | |
var loadHandler = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button id="load">Load Widget</button> | |
<button id="open">Open Widget</button> | |
<!-- BEGIN GROOVE WIDGET CODE --> | |
<script id="grv-widget"> | |
/*<![CDATA[*/ | |
window.groove = window.groove || {}; groove.widget = function(){ groove._widgetQueue.push(Array.prototype.slice.call(arguments)); }; groove._widgetQueue = []; | |
groove.widget('setWidgetId', 'INSERT YOUR WIDGET ID HERE'); | |
groove.widget('setAutoload', false); | |
!function(g,r,v){var a,c,n=r.createElement("iframe");(n.frameElement||n).style.cssText="width: 0; height: 0; border: 0",n.title="",n.role="presentation",n.src="javascript:false",r.body.appendChild(n);try{a=n.contentWindow.document}catch(b){c=r.domain;var d="javascript:document.write('<head><script>document.domain=\""+c+"\";</",i="script></head><body></body>')";n.src=d+i,a=n.contentWindow.document}var s="https:"==r.location.protocol?"https://":"http://",p="http://groove-widget-production.s3.amazonaws.com".replace("http://",s);n.className="grv-widget-tag",a.open()._l=function(){c&&(this.domain=c);var |
OlderNewer