Skip to content

Instantly share code, notes, and snippets.

View alextucker's full-sized avatar
🙏

Alex Tucker alextucker

🙏
View GitHub Profile
@alextucker
alextucker / gist:675778
Created November 14, 2010 00:25
./configure on Ubuntu 10.10 EC2 Instance
Traceback (most recent call last):
File "/home/ubuntu/node/tools/waf-light", line 158, in <module>
Scripting.prepare(t, cwd, VERSION, wafdir)
File "/home/ubuntu/node/tools/wafadmin/Scripting.py", line 145, in prepare
prepare_impl(t, cwd, ver, wafdir)
File "/home/ubuntu/node/tools/wafadmin/Scripting.py", line 135, in prepare_impl
main()
File "/home/ubuntu/node/tools/wafadmin/Scripting.py", line 188, in main
fun(ctx)
File "/home/ubuntu/node/tools/wafadmin/Scripting.py", line 241, in configure
@alextucker
alextucker / gist:848266
Created February 28, 2011 23:24
Selecting Kohana enviroment
<?php
if ($_SERVER['SERVER_NAME'] == 'localhost' ) {
Kohana::$environment = Kohana::DEVELOPMENT;
} else {
Kohana::$environment = Kohana::PRODUCTION;
}
@alextucker
alextucker / bootstrapsnip.php
Created March 2, 2011 22:51
Changing init config based on environment
<?php
if (Kohana::$environment == Kohana::DEVELOPMENT) {
Kohana::init(array(
'base_url' => '/yourapp/',
'profile' => TRUE,
'caching' => FALSE,
'index_file' => TRUE,
));
} else {
//In Production
@alextucker
alextucker / footersnip.php
Created March 2, 2011 23:26
Conditionally adding analytics tracking
<?php if (Kohana::$environment == Kohana::PRODUCTION) { ?>
<!-- Google Analytics Tracking -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'XXXX']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
@alextucker
alextucker / gist:863630
Created March 10, 2011 05:45
Java Example
package test;
import java.util.Scanner;
public class Example {
private int numQuestions;
/**
* @param args
<img src="http://www.holder.io/face/male">
<img src="http://www.holder.io/face/female">
@alextucker
alextucker / gist:6122465
Last active December 20, 2015 11:19
Paste this into the Google App Script Editor
// Get UI Context
var ui = DocumentApp.getUi();
function onOpen(){
ui.createMenu('Stocks').addItem('Add Stock Info', 'addStockInfo_').addToUi();
}
// Handle Menu Item
function addStockInfo_(){
// Prompt user and get result
@alextucker
alextucker / README.md
Last active March 12, 2021 13:21
Installing Dokku and Deploying a Django App
wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash