Skip to content

Instantly share code, notes, and snippets.

View LordZardeck's full-sized avatar

Sean Templeton LordZardeck

View GitHub Profile
@LordZardeck
LordZardeck / silder
Last active July 10, 2021 03:56
Allows videos within a flexslider to stop the slider when playing, and continue the slider when done.
$(function() {
var slider, // Global slider value to force playing and pausing by direct access of the slider control
canSlide = true; // Global switch to monitor video state
// Load the YouTube API. For some reason it's required to load it like this
var tag = document.createElement('script');
tag.src = "//www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
@LordZardeck
LordZardeck / nginxconfig
Last active August 29, 2015 14:06
My personal dev environment install script. Uses PHP5 and NVM for node
server {
server_name ~^(?<vhost>.*)\.dev$ ;
root /home/nginxuser/www/$vhost.dev/public;
index index.html index.php;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
@LordZardeck
LordZardeck / startingInventory.txt
Created April 25, 2015 16:43
Journey to the Core
minecraft:stone_sword,1,0
TConstruct:pickaxe,1,0,{InfiTool:{Unbreaking:0,Damage:0,ToolEXP:0L,ToolLevel:1,HarvestLevel:0,Head:3,Built:1b,HeadEXP:0L,BaseDurability:60,Accessory:3,Modifiers:0,RenderHead:3,BaseAttack:3,Handle:3,HarvestLevelModified:0b,Shoddy:0.0f,Attack:3,RenderHandle:3,MiningSpeed:400,ModDurability:0.0f,BonusDurability:0,Broken:0b,TotalDurability:60,RenderAccessory:3},display:{Name:"§fFlint Pickaxe"}}
TConstruct:shovel,1,0,{InfiTool:{Unbreaking:0,Damage:0,ToolEXP:0L,ToolLevel:1,HarvestLevel:1,Head:3,Built:1b,BaseDurability:60,Modifiers:0,RenderHead:3,Handle:3,BaseAttack:4,Shoddy:0.0f,RenderHandle:3,Attack:4,MiningSpeed:400,ModDurability:0.0f,BonusDurability:0,Broken:0b,TotalDurability:60},display:{Name:"§fFlint Shovel"}}
TConstruct:manualBook,1,0
OpenBlocks:infoBook,1,0
HardcoreQuesting:quest_book,1,0
minecraft:torch,6,0
harvestcraft:applejellysandwichItem,2,0
harvestcraft:rootbeersodaItem,8,0
infiniteinvo:locked_slot,1,0
@LordZardeck
LordZardeck / Decorators.ts
Last active August 29, 2015 14:24
AngularJS TypeScript decorators
function DecorateAngularObject(module: string, target: Object, type: string, className?: string): void {
switch (type) {
case "config":
case "run":
angular.module(module)[type](target);
break;
default:
angular.module(module)[type](className, target);
break;
}
@LordZardeck
LordZardeck / gist:1aa1875960e068251528
Created September 18, 2015 05:30
Developing against Socket.io server
# Developing against Socket.io server
To simulate a socket.io server, open node in REPL and paste these lines:
```js
var app = require('express')(), http = require('http').Server(app), io = require('socket.io')(http);
io.on('connection', function(socket){ console.log('a user connected'); });
http.listen(3000, function(){ console.log('listening on *:3000'); });
```
@LordZardeck
LordZardeck / count-changes
Created January 6, 2016 20:32
Git Line change calculator
#!/usr/bin/env node
"use strict";
let exec = require("child_process").exec;
let args = process.argv.slice(2);
if(args.length <= 0) {
console.error("You must specify at least one commit to track back to.");
return;
@LordZardeck
LordZardeck / git-fetch
Created January 11, 2016 20:19
Update Local git with Remote
#!/bin/bash
git checkout master
git fetch --tags origin
git merge --ff-only origin/master
git branch --merged | grep -v "\*" | xargs git branch -d
@LordZardeck
LordZardeck / setup.sh
Created July 15, 2016 15:49
How to Start an Aurelia Project without seed project
npm init
npm i -g jspm
npm i -D jspm
# The following will setup config and everything. If you want to use Gulp, Grunt, or some other build
# process, then choose "no" when it asks if you want to transpile
jspm install aurelia-framework aurelia-bootstrapper
@LordZardeck
LordZardeck / app.html
Last active August 12, 2016 16:17 — forked from jdanyow/app.html
Aurelia RequireJS Gist
<template>
<h1>${message}</h1>
</template>
@LordZardeck
LordZardeck / config.js
Created August 18, 2016 05:56
GistRun Angular w/ Babel Starter Kit
/* global System */
System.defaultJSExtensions = true;
System.config({
transpiler: "babel",
babelOptions: {
stage: 0,
optional: [
"runtime"