Skip to content

Instantly share code, notes, and snippets.

@ajdruff
ajdruff / How-To-Run-Travis-CI-Locally.md
Last active February 7, 2020 02:36 — forked from purp/README.md
Debug Travis CI config locally using Docker

Debugging Travis CI locally using Docker

This assumes you've got docker-machine installed, running, and can do docker run

1. Get a debug instance running

    docker run --name travis-debug -dit quay.io/travisci/travis-ruby /sbin/init
    docker exec -it travis-debug bash -l
@ajdruff
ajdruff / README.md
Created February 6, 2020 06:04 — forked from purp/README.md
Debug Travis CI config locally using Docker

Debugging Travis CI locally using Docker

This assumes you've got docker-machine installed, running, and can do docker run

1. Get a debug instance running

    docker run --name travis-debug -dit quay.io/travisci/travis-ruby /sbin/init
    docker exec -it travis-debug bash -l
@ajdruff
ajdruff / ssh-permissions.md
Last active April 25, 2019 06:22
SSH Permissions
        #sets permissions so you don't get error that permissions are too open
        #ref: https://superuser.com/a/215506
        find /$HOME/.ssh/ -type f -exec chmod 600 {} \;

find /$HOME/.ssh/ -type d -exec chmod 700 {} ;

@ajdruff
ajdruff / fix-git-line-endings
Last active February 29, 2024 13:02
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@ajdruff
ajdruff / sql-joins-image.md
Last active August 29, 2015 14:14
SQL Joins

#SQL Joins

  ![SQL Joins](https://gist.github.com/simpliwp/61718228cc1e506ab3fa/raw/682ab31e6ef9c24db1ca62050512f38f083f5681/sql.png)

SQL Joins

/**
* Get Google Page Speed Screenshot
*
* Uses Google's Page Speed API to generate a screenshot of a website.
* Returns the image as a base64 jpeg image tag
*
* Usage Example:
* echo getGooglePageSpeedScreenshot("http://ghost.org", 'class="thumbnail"');
*
*
@ajdruff
ajdruff / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console