Skip to content

Instantly share code, notes, and snippets.

View lukewpatterson's full-sized avatar

Luke Patterson lukewpatterson

View GitHub Profile
@lukewpatterson
lukewpatterson / gist:4242707
Created December 9, 2012 00:24
squeezing private SSH key into .travis.yml file
Tricks to add encrypted private SSH key to .travis.yml file
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)"
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_
@lukewpatterson
lukewpatterson / gist:4253996
Created December 10, 2012 22:39
downloads deploy notes
curl -u veeweebot -d '{"scopes": ["public_repo"], "note": "token link text", "note_url": "http://www.butterball.com/"}' https://api.github.com/authorizations
@lukewpatterson
lukewpatterson / gist:4282391
Created December 14, 2012 03:09
google drive notes
https://developers.google.com/drive/service-accounts#use_regular_google_accounts_as_application-owned_accounts
https://developers.google.com/drive/scopes#google_drive_scopes
https://developers.google.com/drive/v2/reference/
https://developers.google.com/drive/v2/reference/files/copy
https://developers.google.com/oauthplayground/
@lukewpatterson
lukewpatterson / gist:6491377
Last active January 27, 2016 08:19
db2 in docker
FROM base
RUN echo "deb http://archive.canonical.com/ubuntu precise partner" >> /etc/apt/sources.list
RUN echo "deb-src http://archive.canonical.com/ubuntu precise partner" >> /etc/apt/sources.list
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list
RUN echo "deb-src http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get --yes install ksh
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#428bca",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#428bca",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
{
"vars": {
"@gray-darker": "lighten(#000, 45.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#428bca",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
khs-docker-caching-blog$ docker build .
Sending build context to Docker daemon 2.633 MB
Sending build context to Docker daemon
Step 0 : FROM maven:3.2.5-jdk-8u40
---> cef499116951
Step 1 : RUN mkdir --parents /usr/src/app
---> Using cache
---> 43927e63fa7d
Step 2 : WORKDIR /usr/src/app
---> Using cache
khs-docker-caching-blog$ docker build .
Sending build context to Docker daemon 2.633 MB
Sending build context to Docker daemon
Step 0 : FROM maven:3.2.5-jdk-8u40
---> cef499116951
Step 1 : RUN mkdir --parents /usr/src/app
---> Using cache
---> 43927e63fa7d
Step 2 : WORKDIR /usr/src/app
---> Using cache
package com.keyholesoftware.blog;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}