Skip to content

Instantly share code, notes, and snippets.

@wehappyfew
wehappyfew / ssh-config-github-multiple-deploy-keys
Created September 29, 2016 13:10
Using multiple github deploy keys from a Jenkins instance
# When using a CI server, like Jenkins, in conjunction with github, you may wish to use
# multiple deploy keys (github-speak for an rsa key pair that has been assigned to a single
# repo, rather than a user) to allow Jenkins to pull code from the github repositories
# In the example here, where three repos are used, the idea is to take advantage of ssh's config mechanism
# For use with Jenkins, do the following:
# login to your CI Server
sudo su jenkins
cd ~/.ssh/
@wehappyfew
wehappyfew / setup_selenium.sh
Created April 12, 2016 12:46 — forked from curtismcmullan/setup_selenium.sh
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in
@wehappyfew
wehappyfew / GitHub curl.sh
Created February 2, 2016 12:36 — forked from Integralist/GitHub curl.sh
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@wehappyfew
wehappyfew / CodeDeploy Policy
Last active January 28, 2016 09:11 — forked from flomotlik/CodeDeploy Policy
This policy provides the entity that is attached to [IAM user] , with the rights to actually create new application revisions, create new deployments, update the deployment configuration and get the status of a deployment. The following snippet for CodeDeploy sets the minimum required rights. Please note, that you need to adapt the snippet to yo…
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codedeploy:RegisterApplicationRevision",
"codedeploy:GetApplicationRevision"
],
"Resource": [