Skip to content

Instantly share code, notes, and snippets.

View JeffCost's full-sized avatar

Jeff C JeffCost

  • August Ash Inc.
View GitHub Profile
using System;
using System.Collections.Generic;
public class GameEvent
{
}
public class EventMessenger
{
@JeffCost
JeffCost / pre-commit
Last active December 30, 2015 06:48 — forked from grafikchaos/pre-commit
#!/usr/bin/env php
<?php
/**
*
* Setup
*
* chmod +x ~/path/to/file/phplint_drupal_pre-commit
* ln -s ~/path/to/file/phplint_drupal_pre-commit .git/hooks/pre-commit
*
/* Servo Recorder
The following commands are supported:
a records the current servo position for 5 seconds
b releases the servo to record the position
c plays back the recorded position for 5 seconds
d calibrates all angles from 0...180
The minimum and maximum pulse width will vary with different servo models.
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@JeffCost
JeffCost / PHP: Composer from local repo
Last active December 21, 2015 07:19
PHP: Composer from local repo
"repositories": [
{
"type":"vcs",
"url":"/home/jeff/dev/bundles/MyCustomBundle"
}
],
"require":{
"jeff/some-package":"dev-master"
}
#
# Run as root
# $ bash <(curl -s https://raw.github.com/gist/1631411)
#
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl \
libssl-dev \

A guide for installing modules with the MAGE installer

Magento Mage installer

Adjust permissions

Make the mage package executable

LOCAL ONLY

chmod 777 ./mage

A collection of Drupal snippets.

Home / Front Page Tricks

Remove the Default message on home page with our creating a post

<?php if(drupal_is_front_page()) {unset($page['content']['system_main']['default_message']);} ?>
@JeffCost
JeffCost / GIT: Add-Remove Tags
Last active December 17, 2015 18:29
GIT: Add/Remove Tags
1) Delete the v0.4 tag locally: git tag -d v0.4
2) Delete the v0.4 tag on GitHub (which removes its download link): git push origin :v0.4
3) Add a new tag for the newest stable release: git tag -a v0.5 -m "Version 0.5 Stable"
4) Push the latest tag to GitHub (two dashes): git push --tags
@JeffCost
JeffCost / GIT: Ignore tracked files
Created December 14, 2012 04:53
GIT: Ignore tracked files
[alias]
ignore = !git update-index --assume-unchanged
unignore = !git update-index --no-assume-unchanged
ignored = !git ls-files -v | grep ^[a-z]
Usage:
git ignore <file>
git unignore <file>
git ignored