Skip to content

Instantly share code, notes, and snippets.

@jlyon
jlyon / AWS_Getting_Started.md
Last active December 28, 2015 01:19
Getting started with AWS: Auto-assigning an IP on boot, etc

Install ec2 tools

Set JAVA_HOME
  • See if JAVA_HOME is set: $JAVA_HOME
  • Find Java path (see AWS docs)
echo 'export JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64/jre"' >> ~/.bashrc
# May also be: echo 'export JAVA_HOME="/usr/lib/jvm/java-7-oracle"' >> ~/.bashrc
# verify Java path

Startup task methods in Ubuntu

Upstart

From: Stack Overflow post

  • Install upstart
sudo apt-get install upstart
@jlyon
jlyon / pulling_files.md
Created December 12, 2013 08:35
Pulling files

Pantheon

Acquia

@jlyon
jlyon / helpful_formatters_module.md
Created December 12, 2013 08:38
Helpful formatters module

Helpful formatters module

Purpose: get a bunch of helpful display formatters all in one place

Created:

  • URL to image style: get a plain url to an image style (for json feeds): flight_library_carousels.module

Ideas:

  • Click to play on youtube videos (other oembed too)
@jlyon
jlyon / pdftk-rotate.sh
Last active September 29, 2017 17:02
pdftk rotate
# Input: a.pdf, only export odd pages, rotate 180 degrees
pdftk A=a.pdf cat AoddD output b.pdf
@jlyon
jlyon / ab-benchmarking.md
Last active August 29, 2015 13:57
benchmarking with ab
@jlyon
jlyon / phonegap-cli.md
Last active August 29, 2015 13:57
phonegap, cordova, android, cli

Install

sudo npm install -g cordova
# Make sure that android sdk paths are in $PATH:
# export PATH=$PATH:/media/sda4/shared/android/adt-bundle-linux-x86_64-20131030/sdk/platform-tools:/media/sda4/shared/android/adt-bundle-linux-x86_64-20131030/sdk/tools

Create project

cordova add myapp
@jlyon
jlyon / gist:3d1692b37463f82a32ac
Last active August 29, 2015 14:06
Drupal password encryption
<?php
// Remove the asterisks with real values
$username = '2*****charity';
$hashed_password = '$S$Dk9wYRxEp7GmdP4tVn05MIlcIpzfCFH2sDsS.coi8HMnL.RtIvse';
$password = "22***VA";
if (check_password($password, $hashed_password)) {
echo 'passes';
}
@jlyon
jlyon / gist:2c4ae6c87576cc3e3f32
Created November 25, 2014 08:03
asus-zenbook-linux-mint
booting from grub (via usb flash drive):
http://answers.microsoft.com/en-us/windows/forum/windows_8-system/secure-boot-violation-invalid-signature-detected/93996494-95e8-4e49-bb7b-301431436265
@jlyon
jlyon / zenbook.md
Last active December 16, 2015 22:34
Manual installation steps for Jeff's Asus Zenbook

###Model name: UX303LA

Fix touchpad

 Thanks a lot, Pilot6! I have an ASUS ZenBook UX303LN and I'm running Ubuntu 15.04, and using this the touchpad works perfectly. To possibly help clarify for others, these are the steps you need to do:

Code:
sudo add-apt-repository ppa:hanipouspilot/focaltech-dkms
sudo apt-get update
sudo apt-get install focaltech-dkms