Skip to content

Instantly share code, notes, and snippets.

View alextucker's full-sized avatar
🙏

Alex Tucker alextucker

🙏
View GitHub Profile
cat ~/.ssh/id_rsa.pub | ssh root@yourdomain.com "gitreceive upload-key alex"
cd /home/git
echo yourdomain.com >> VHOST
wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
@alextucker
alextucker / ssh.sh
Last active December 21, 2015 17:39
ssh root@yourdomain.com
@alextucker
alextucker / README.md
Last active March 12, 2021 13:21
Installing Dokku and Deploying a Django App
@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
<img src="http://www.holder.io/face/male">
<img src="http://www.holder.io/face/female">
@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
@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 / 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