Skip to content

Instantly share code, notes, and snippets.

View adamgoose's full-sized avatar

Adam Engebretson adamgoose

View GitHub Profile
@adamgoose
adamgoose / dns
Created July 16, 2012 22:57
DNS Site Config
<VirtualHost *:80>
ServerName dns.enge.me
ServerAdmin webmaster@localhost
DocumentRoot /home/DNSMan/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/DNSMan/public_html>
@adamgoose
adamgoose / apache2.conf
Created July 16, 2012 23:07
Apache Config
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@adamgoose
adamgoose / gist:3148861
Created July 20, 2012 05:29
JSON Response
Request URL:http://dnsmanpro.com/api.php
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:118
@adamgoose
adamgoose / dannerFix.html
Created August 22, 2012 21:36
Danner's Fix
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$("div.staff-trigger").click(function(){
$(this).next().slideToggle();
return false;
<?php
$sql = "SELECT * FROM `givers`";
if($givers = mysql_query($sql)) {
$return = "[";
while($giver = mysql_fetch_array($givers)) {
$return .= "'".$giver['last'].", ".$giver['firsts']."', ";
$json[$giver['last'].", ".$giver['firsts']] = $giver['id'];
}
$return = substr($return, 0, -2)."]";
@adamgoose
adamgoose / gist:5485935
Created April 30, 2013 00:50
Rename image
<?php
foreach($order->images() as $key => $image) {
$ext = explode(".", $image->imageName);
$ext = $ext[count($ext)-1];
$newName = "NEWFILENAME_".$key.".".$ext;
//rename file from $image->imageName to $newName
$image->imageName = $newName;
[[!getResources?
&parents=`[[*id]]`
&showHidden=`1`
&toPlaceholder=`nextid`
&limit=`1`
&tpl=`@INLINE [[+id]]`
&offset=`[[+offset]]`
]]
<div class="span6">
<article class="latest-article">
<?php
class CategoryController extends \BaseController {
protected $layout = 'layouts.dashboard';
public $category;
public function __construct() {
parent::__construct();
@adamgoose
adamgoose / skub.php
Created December 12, 2013 20:49
Skub Laravel, v4.1
<?php
return "skub";
@adamgoose
adamgoose / laravel.coffee
Created December 15, 2013 23:27
Laravel Doc finder for [hubot](http://hubot.github.com)
# Description
# docs will search the Laravel documentation
#
# Dependencies:
# none
#
# Configuration:
# none
#
# Commands: