Skip to content

Instantly share code, notes, and snippets.

Nicholas Duffy duffn

Block or report user

Report or block duffn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
duffn / periodTrigger.groovy
Created Jul 19, 2019
Update a Scan Repository Trigger in a Jenkins GitHub Cloudbees folder
View periodTrigger.groovy
// Update the PeriodicFolderTrigger of each job inside of a Cloudbees folder.
// Useful for updating individual repos as you cannot do this through the UI.
import com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger
import jenkins.model.Jenkins
import jenkins.branch.OrganizationFolder
println "Multibranch Items\n-------"
Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject.class).each { it.triggers
.findAll { k,v -> v instanceof com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger }
duffn / dracula-refined.css
Created Mar 16, 2019
Dracula Theme for GitHub with Refined GitHub
View dracula-refined.css
.blob-code-inner {
font-family: 'Hack', Menlo, monospace;
font-size: 16px;
.blob-code-inner {
color: #FF79C6;
duffn / s3_public_bucket_policy.json
Last active Sep 8, 2018
S3 Public Bucket Policy
View s3_public_bucket_policy.json
"Version": "2012-10-17",
"Statement": [{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": ["s3:GetObject"],
"Resource": ["*"]

Keybase proof

I hereby claim:

  • I am duffn on github.
  • I am duffn ( on keybase.
  • I have a public key whose fingerprint is 8F29 B3DB 69FE 0961 A8E4 4AC5 3459 9F4A AC3B 4C9E

To claim this, I am signing this object:

duffn / mysql_docker_buffalo.txt
Created Aug 31, 2018
MySQL in Docker with Buffalo
View mysql_docker_buffalo.txt
# MySQL in Docker
docker run --name=mysql01 -p 3306:3306 mysql/mysql-server:latest
docker exec -it mysql01 mysql -uroot -p
# Enter the one time password generated from the docker run command
# and then change the root password
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypassword';
# Create a user with your host IP address so it can connect from Buffalo
# outside the container
create user 'root'@'' with password 'mypassword';
duffn /
Created Aug 19, 2018
greleaser -p 10003 -v 10001 -g my-github-project
duffn /
Created Mar 28, 2018 — forked from kjoconnor/
boto script to delete snapshots matching a filter and older than X days
import sys
from boto.ec2 import connect_to_region
from datetime import datetime, timedelta
days = int(sys.argv[1])
except IndexError:
days = 7
duffn /
Created Feb 13, 2018
django-graphene JWT authorization
# Authorization with django-graphene
# using django-jwt-auth==0.0.2
from django.conf.urls import url
from django.views.decorators.csrf import csrf_exempt
from graphene_django.views import GraphQLView
from jwt_auth.mixins import JSONWebTokenAuthMixin
class AuthGraphQLView(JSONWebTokenAuthMixin, GraphQLView):
duffn / ansible-container-0.9.1rc0-meta-build-failure.txt
Created Apr 18, 2017
View ansible-container-0.9.1rc0-meta-build-failure.txt
2017-04-18T22:12:05.563144 2017-04-18T22:12:05.563144 Docker™ daemon integration engine loaded. Build starting. [container.core] caller_file='/_ansible/container/' caller_func='conductorcmd_build' caller_line=606 project='ansible-container3'
2017-04-18T22:12:05.566569 Building service... [container.core] caller_file='/_ansible/container/' caller_func='conductorcmd_build' caller_line=613 project='ansible-container3' service=u'web'
2017-04-18T22:12:05.574340 Base fingerprint hash = 932035f3f542f64b2f72f561b35fb3563e0221257293d5a7e1d92c246dbc9bfc [container.core] caller_file='/_ansible/container/' caller_func='conductorcmd_build' caller_line=618 hash='932035f3f542f64b2f72f561b35fb3563e0221257293d5a7e1d92c246dbc9bfc' service=u'web'
Traceback (most recent call last):
File "/usr/local/bin/conductor", line 11, in <module>
load_entry_point('ansible-container', 'console_scripts', 'conductor')()
File "/_ansible/container/", line 19, in __wrapped__
return fn(*args,
duffn / ansible-container-0.9.1rc0-failed_build.txt
Created Apr 18, 2017
View ansible-container-0.9.1rc0-failed_build.txt
PLAYBOOK: playbook.yml *********************************************************
1 plays in /tmp/tmpXO0aY_/playbook.yml
PLAY [web] *********************************************************************
TASK [Gathering Facts] *********************************************************
Using module_utils file /usr/local/lib/python2.7/dist-packages/ansible/module_utils/
Using module_utils file /usr/local/lib/python2.7/dist-packages/ansible/module_utils/
Using module_utils file /usr/local/lib/python2.7/dist-packages/ansible/module_utils/
Using module_utils file /usr/local/lib/python2.7/dist-packages/ansible/module_utils/
You can’t perform that action at this time.