Skip to content

Instantly share code, notes, and snippets.

View kingcody's full-sized avatar

Cody Mize kingcody

  • Digitally Seamless
View GitHub Profile
@kingcody
kingcody / PKGBUILD
Created June 29, 2013 04:34
Pianobarfly PKGBUILD(ABS) for ghuntly/pianobarfly realease: 20130628
# Contributor: Cyker Way <cykerway at gmail dot com>
pkgname=pianobarfly-git
pkgver=20130628
pkgrel=1
pkgdesc="A console client for the personalized web radio pandora"
url="http://www.ghuntley.com/"
arch=('i686' 'x86_64')
license=('MIT')
depends=('libao' 'faad2' 'libmad' 'readline')
optdepends=('libmad')
@kingcody
kingcody / activeClassing.patch
Last active December 25, 2015 03:59
Active Classing Patch to routes/index.js
unchanged:
--- b/routes/index.js
+++ b/routes/index.js
@@ -4,6 +4,13 @@
var merge = require('merge'),
fs = require('fs');
+// Returns a camel cased version of input
+var camelCase = function camelCase(input) {
+ return input.toLowerCase().replace(/-(.)/g, function(match, group1) {
@kingcody
kingcody / gist:7051224
Last active December 25, 2015 22:39 — forked from detrohutt/gist:7051206
extends layout
block content
.container
#accordion.panel-group
- for (var i = 0; i < serviceList.length; i++)
.panel.panel-default
.panel-heading
h4.panel-title
a.accordion-toggle(data-toggle='collapse', data-parent='#accordion', href='#'+serviceList[i].name)=serviceList[i].name
@kingcody
kingcody / toCamelCase
Last active December 25, 2015 22:39
extend js string object to include toCamelCase method
// string.toCamelCase()
if (!String.prototype.toCamelCase) {
String.prototype.toCamelCase = function toCamelCase() {
return this.toLowerCase().replace(/(\-[a-zA-Z])/g, function($1) {
return $1.toUpperCase().replace('-','');
})
};
}
@kingcody
kingcody / PKGBUILD
Created November 13, 2013 08:24 — forked from detrohutt/PKGBUILD
# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
pkgname=udns
pkgver=0.2
pkgrel=1
pkgdesc='Stub DNS resolver library with ability to perform both syncronous and asyncronous DNS queries'
url='http://www.corpit.ru/mjt/udns.html'
license=('LGPL')
arch=('i686' 'x86_64' 'armv6h')
// Custom user-defined rules for polkit
//
// See the polkit(8) man page for more information
// about configuring polkit.
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.suspend" ||
action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
action.id == "org.freedesktop.login1.hibernate" ||
action.id == "org.freedesktop.login1.hibernate-multiple-sessions" ||
@kingcody
kingcody / socket.service.js
Last active July 8, 2022 04:06
socket.io service for angular-fullstack
/* global io */
'use strict';
angular.module('testFullstackApp')
.factory('socket', function(socketFactory) {
// socket.io now auto-configures its connection when we ommit a connection url
var ioSocket = io('', {
// Send auth token on connection, you will need to DI the Auth service above
// 'query': 'token=' + Auth.getToken()
@kingcody
kingcody / test-file-creation.js
Created September 6, 2014 02:06
angular-fullstack testing
/*global describe, beforeEach, it */
'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
var chai = require('chai');
var expect = chai.expect;
var fs = require('fs-extra');
var exec = require('child_process').exec;
describe('angular-fullstack generator', function () {
@kingcody
kingcody / config
Created December 8, 2014 03:06
Irssi config
servers = (
{ address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; },
{ address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; },
{ address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; },
{
address = "irc.undernet.org";
chatnet = "Undernet";
port = "6667";
},
{ address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
@kingcody
kingcody / init
Last active August 29, 2015 14:18
Init for gitlab-ci-multi-runner (docker)
#!/bin/bash
# gitlab-ci-multi-runner data directory
DATA_DIR="/data"
CONFIG_FILE=${CONFIG_FILE:-$DATA_DIR/config.toml}
# custom certificate authority path
CA_CERTIFICATES_PATH=${CA_CERTIFICATES_PATH:-$DATA_DIR/certs/ca.crt}
LOCAL_CA_PATH="/usr/local/share/ca-certificates/ca.crt"
update_ca () {