Skip to content

Instantly share code, notes, and snippets.

@Zoramite
Zoramite / index1.htm
Created November 16, 2011 19:25
jQuery plugin definition with optional support for RequireJS
<!doctype html>
<html lang="en">
<head>
<title>Test Execute Order</title>
</head>
<body>
<script src="//requirejs.org/docs/release/1.0.1/minified/require.js"></script>
<script>
require.config({
@Zoramite
Zoramite / jquery.groupedAjax.js
Created February 14, 2012 21:17
jQuery ajax grouping with Deferred objects.
(function($){
var requests = {};
$(function(){
// Determine which data you need and call the getData()...
// Stubbing in some example data...
// This is a unique request and would make an ajax call
getData({
foo: 'bar'
@Zoramite
Zoramite / p2p.js
Created February 18, 2012 19:41
Example of using Node.js to parse P2PXML.com file.
// Usage: node p2p.js
var xml2object = require('xml2object'); // npm install xml2object
var filename = 'prosper.xml';
// Create a parser to look for Loan objects in the xml file
var parser = new xml2object(filename, ['Loan']);
// Handle any errors
@Zoramite
Zoramite / winstonLogLevel.js
Created March 8, 2012 20:29
Testing changing the level of logging on the default logger for winston.
var winston = require('winston');
winston.cli();
console.log('Winston at level %s', winston.level);
winston.level = 'warn';
console.log('Winston at level %s', winston.level);
@Zoramite
Zoramite / maintenance.sh
Created March 14, 2012 21:25
Git Maintenance Commands
# Verifies the connectivity and validity of the objects in the database
git fsck —unreachable
# Manage reflog information
git reflog expire —expire=0 —all
# Pack unpacked objects in a repository
git repack -a -d -l
# Prune all unreachable objects from the object database
@Zoramite
Zoramite / git_aliases.sh
Created March 14, 2012 21:34
Git Bulk Aliases
alias gitstatus='find . -maxdepth 2 -path "*/.git" -print -execdir git status ";"'
alias gitfetch='find . -maxdepth 2 -path "*/.git" -print -execdir git fetch origin ";"'
alias gitpull='find . -maxdepth 2 -path "*/.git" -print -execdir git pull ";"'
alias gitpush='find . -maxdepth 2 -path "*/.git" -print -execdir git push ";"'
alias gitprune='find . -maxdepth 2 -path "*/.git" -print -execdir git prune ";"'
alias gitsub='find . -maxdepth 2 -path "*/.git" -print -execdir git submodule update --init --recursive ";"'
@Zoramite
Zoramite / README
Last active August 29, 2015 14:06
CSP Errors in Chrome Packaged App from Dart Transformer
Example for the discussion on the CPA transformer bug.
https://groups.google.com/a/dartlang.org/d/topic/web/MvEeAN4cJLM/discussion
All files that do not start with pubspec should be moved to a web/ directory. Gist does not allow subdirectories.
@Zoramite
Zoramite / settings.ini
Created June 2, 2015 17:35
Kossel Pro
avoid_crossing_perimeters = 1
bed_shape = circular
bed_size = 240,240
bed_temperature = 70
bottom_clip_amount = 0
bottom_solid_layers = 3
bridge_acceleration = 0
bridge_fan_speed = 100
bridge_flow_ratio = 1
bridge_speed = 20
@Zoramite
Zoramite / readme.md
Last active August 29, 2015 14:22
doTerra Volume History

dōTERRA Wellness Advocate historical volume.

This script is intended to make it easier to retrieve the historical PV, TV, and OV for a wellness advocate. The current system makes it almost impossible to get the historical values past the latest couple of months.

To download a CSV of your historical volumes paste the following into the chrome console when you are logged into the Teams page of the back office.

$('<script src="https://rawgit.com/Zoramite/52a19050a6753b5fb492/raw/volume.js" type="text/javascript"></script>').appendTo($("head"));

Then run the following to download your volume history:

@Zoramite
Zoramite / jinja_deps.py
Last active July 22, 2019 01:04
Jinja2 Dependency Detection
"""Test how the Jinja templates"""
import os
import jinja2
from jinja2.ext import Extension
class DependenciesExt(Extension):
"""This extension attempts to track the dependencies used in a template."""
def filter_stream(self, stream):