Skip to content

Instantly share code, notes, and snippets.

View cmcculloh's full-sized avatar

Christopher McCulloh cmcculloh

View GitHub Profile
@cmcculloh
cmcculloh / a.rb
Last active August 29, 2015 14:01
showLoading: function showLoading(msg) {
var loading = app.views.get('loading');
if (typeof msg === "undefined") {
msg = "Loading, please wait...";
}
//render to put new error message in there if already visible
if (loading.isVisible) {
loading.render();
} else {//otherweise, show it
.no-gutter {
padding: 0;
}
.pad-top-15 {
margin-top: 15px;
}
.pad-top-5 {
margin-top: 5px;
<!--div id="canvas-header" class="container-fluid no-gutter">
<div class="row-fluid">
<div class="col-sm-6 col-lg-4">
<div class="row-fluid">
<div class="col-sm-12 col-lg-12 no-gutter">
<div class="title">
<input class="form-control editable input-lg" id="name-input" type="text" placeholder="{{I18N_NAME}}" value="{{name}}{{^name}}{{I18N_NAME}}{{/name}}">
</div>
</div>
</div>
@cmcculloh
cmcculloh / default.js
Last active August 29, 2015 14:02
Twitter Getter - Blinking tweets on your sparkboard
//put this in a config/ directory
module.exports = {
io: {
token: '',
deviceId: ''
},
twitter: {
consumer_key: '',
consumer_secret: '',
access_token_key: '',
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Conforming XHTML 1.0 Strict Template</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
<script type="text/javascript">
$(function(){
$("#selectBoxId").change(function(){
var selectedValue = $(this).find(":selected").val();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Conforming XHTML 1.0 Strict Template</title>
<style>
@-webkit-keyframes turnit{
from{
-webkit-transform: rotate(0deg);
}
cQuery.animations = [];
setInterval("cQuery.runAnimations()", 100);
cQuery.runAnimations = function(){
for(var i=0; i < cQuery.animations.length; i++){
cQuery.animations[i].animation();
}
}
<?
$n = 10;
$i = 3;
if(calc($n) < calc($i){
import os
def listDirectory(directory, tabStops, originalPath):
tabStops = tabStops + "\t"
os.chdir(directory)
newPath = os.getcwd()
dirlist = os.listdir(".")
@cmcculloh
cmcculloh / post-receive-email
Created November 18, 2010 19:52
Example of a post receive email file called by a git hook that sends a color coded formatted html email of the git diff
#!/bin/sh
#
# Copyright (c) 2007 Andy Parkins
#
# An example hook script to mail out commit update information. This hook
# sends emails listing new revisions to the repository introduced by the
# change being reported. The rule is that (for branch updates) each commit
# will appear on one email and one email only.
#
# This hook is stored in the contrib/hooks directory. Your distribution