Skip to content

Instantly share code, notes, and snippets.

View gist:ef28176dbfeb6e79e8965bff76515843
- name: get app source
aws_s3:
aws_access_key: "{{ lookup('ini', 'aws_access_key_id section=default file=~/.aws/credentials') }}"
aws_secret_key: "{{ lookup('ini', 'aws_secret_access_key section=default file=~/.aws/credentials') }}"
bucket: my_bucket
object: /files/my_app.tar.gz
dest: /home/app/my_app.tar.gz
mode: get
environment:
S3_USE_SIGV4: True
@dgm
dgm / gist:dc2876a136da1b3759ff11fc6c75974e
Created May 12, 2016
Latest crashplan update complete borked on synology
View gist:dc2876a136da1b3759ff11fc6c75974e
TARGETDIR=/volume1/@appstore/CrashPlan
BINSDIR=/bin
MANIFESTDIR=/volume1/crashplan/backupArchives
INSTALLDATE=20160428
JAVACOMMON=${JAVA_HOME}/bin/java
APP_BASENAME=CrashPlan
DIR_BASENAME=crashplan
JRE_X64_DOWNLOAD_URL=http://download.code42.com/installs/proserver/jre/jre-7-linux-x64.tgz
JRE_I586_DOWNLOAD_URL=http://download.code42.com/installs/proserver/jre/jre-7-linux-i586.tgz
Sourcing ../../install.vars...
@dgm
dgm / gist:9994949
Created Apr 5, 2014
Some good tips on pdf generation in rails
View gist:9994949
http://www.sitepoint.com/pdf-generation-rails/
http://adamalbrecht.com/2014/01/14/generate-clean-testable-pdf-reports-in-rails-with-prawn/
http://big-elephants.com/2012-12/pdf-rendering-with-phantomjs/
View gist:8814066
1.9.3-p327 :001 > "foo
1.9.3-p327 :002"> bar
1.9.3-p327 :003"> baz"
=> "foo\nbar\nbaz"
1.9.3-p327 :004 > foo = <<EOL
1.9.3-p327 :005"> foo
1.9.3-p327 :006"> bar
1.9.3-p327 :007"> baz
1.9.3-p327 :008"> EOL
=> "foo\nbar\nbaz\n"
View gist:8359337
%w(this that).each do |pkg|
yum_package pkg do
action :install
end
end
%(this that).each {|pkg| package pkg}
View gist:8318564
class Chef::Recipe::WestedRepo
attr_reader :project
def initialize(project)
@project = project
end
def create_user
user project[:id] do
action :create
View gist:1206990
$('.list-delete').live("ajax:success", function(xhr, data, status) {
$(this).closest('li').html(data).effect("highlight", {}, 2000).fadeOut();
});
@dgm
dgm / gist:597180
Created Sep 25, 2010
Funny form submit behaviour
View gist:597180
<html>
<head>
<script src="jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript">
// handle some keypresses to navigate in a grid style
$('.tabstop').live('keydown',function(e){
switch(e.which) {
case 40: // down
e.preventDefault();
$(this).nextAll().filter('.tabstop').first().focus();
You can’t perform that action at this time.