Skip to content

Instantly share code, notes, and snippets.

@liferealized
liferealized / insight.conf
Last active August 29, 2015 14:16
Insight Server Upstart Script
#!upstart
description "Insight Server Daemon"
start on startup
stop on shutdown
# This line is needed so that Upstart reports the pid of the Node.js process
# started by Forever rather than Forever's pid.
expect fork
#!/bin/bash
cd /;
tar cf cg.tar /opt/miners/cgminer/;
for n in {101,103,104,106,107,108,110,111,112,114,115,116,117}; do ssh root@192.168.2.$n 'tar -C / -x; mine restart' < /cg.tar; echo; done;
#!/bin/bash
cd /;
tar cf cg.tar /opt/miners/cgminer/;
for n in {113,118,119,120,121}; do ssh root@192.168.2.$n 'tar -C / -x; mine restart' < /cg.tar; echo; done;
@liferealized
liferealized / atitweak
Created November 16, 2011 16:44
Start up script for debian system that uses atitweak to set gpu fan speeds
#!/bin/bash
# Author: Patrick "p2k" Schneider <me@p2k-network.org>
# Donate: 166rK7eEVgnGvs9aA7jvu8NoPv8KzbPQ3L
# Install rcX.d scripts: update-rc.d atitweak defaults
# Uninstall: update-rc.d -f atitweak remove
### BEGIN INIT INFO
# Provides: atitweak
@liferealized
liferealized / gist:774386
Created January 11, 2011 13:04
Print Fitbit
(function() {
var doc = document
, html = doc.getElementsByTagName('html')[0]
, main = doc.getElementById('main')
, header = doc.getElementById('header')
, cBody = doc.getElementById('contentBody')
, mods = doc.getElementById('modules')
, content = doc.getElementById('content')
, tNav = doc.getElementById('trackerNav')
<cfscript>
// we use $wheels here since these variables get placed in the variables scope of all objects and we need to make sure they don't clash with other wheels variables or any variables the develoepr may set
if (!StructIsEmpty(application.wheels.mixins))
{
$wheels.metaData = GetMetaData(this);
if (StructKeyExists($wheels.metaData, "displayName"))
$wheels.className = $wheels.metaData.displayName;
else
$wheels.className = Reverse(SpanExcluding(Reverse(GetMetaData(this).name), "."));
if (StructKeyExists(application.wheels.mixins, $wheels.className))
// create directory and unzip code for the most recent version of each plugin
if (loc.pluginFiles.recordCount)
{
loc.iEnd = loc.pluginFiles.recordCount;
for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
{
loc.name = loc.pluginFiles["name"][loc.i];
loc.pluginName = ListFirst(loc.name, "-");
if (!StructKeyExists(application.wheels.plugins, loc.pluginName))
{
// create directory and unzip code for the most recent version of each plugin
if (loc.pluginFiles.recordCount)
{
loc.iEnd = loc.pluginFiles.recordCount;
for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
{
loc.name = loc.pluginFiles["name"][loc.i];
loc.pluginName = ListFirst(loc.name, "-");
if (!StructKeyExists(application.wheels.plugins, loc.pluginName))
{