Skip to content

Instantly share code, notes, and snippets.

View sebnash's full-sized avatar

Seb Nash sebnash

View GitHub Profile
@sebnash
sebnash / rapha_brands.json
Created June 25, 2014 15:20
Create Ticket for Brand config
{
"brand_21cf": "21cf@rapha.cc",
"brand_ausnz": "ausnz@rapha.cc",
"brand_ccldn": "ccldn@rapha.cc",
"brand_ccmcr": "ccmcr@rapha.cc",
"brand_ccnyc": "ccnyc@rapha.cc",
"brand_ccsfc": "ccsfc@rapha.cc",
"brand_enquiries": "enquiries@rapha.cc",
"brand_ipp": "ipp@rapha.cc",
"brand_kundenservice": "kundenservice@rapha.cc",
@sebnash
sebnash / body
Created May 9, 2014 12:41
Notify Foration of comment update
{{updater.name}} has updated a ticket in pebble.it Zendesk.
Ticket details follow.
#TicketId: {{ticket.id}}
#Subject: {{ticket.title}}
#Created: {{ticket.created_at}}
#Status: {{ticket.status}}
#Firstname: {{ticket.requester.first_name}}
#Lastname: {{ticket.requester.last_name}}
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
killall NotificationCenter
@sebnash
sebnash / Code.js
Last active December 21, 2015 00:59
Google Apps Script that writes to a Spreadsheet a list of your Sites and when they were last edited (and the page that was edited).
/**
* For more information on using the Sites API, see
* https://developers.google.com/apps-script/service_sites
*
* TODO: "Edited by" column (is this possible?)
* Getting inconsistent results via Sites Services, may move to Sites API:
* https://developers.google.com/google-apps/sites/
* Can't use yet - GAS helper methods don't support OAuth 2.0
*/
@sebnash
sebnash / gist:6175625
Created August 7, 2013 16:22
Regex for Paul. Matching something between square brackets.
var matched = searchString.match(/(?<=\[)(.*)(?=\])/);
@sebnash
sebnash / gist:5186353
Created March 18, 2013 10:47
Puppet test run (for Getting Started with Puppet 4)
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/puppet]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/provider]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/provider/profile_manager]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/provider/profile_manager/osx.rb]/ensure: defined content as '{md5}48a098b58bf3fdf38f32a0261026fa59'
Notice: /File[/var/lib/puppet/lib/puppet/type]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/type/profile_manager.rb]/ensure: defined content as '{md5}578a75ebe7f9972c7f49f8c5d4e1ad43'
Notice: /File[/var/lib/puppet/lib/facter]/ensure: created
Notice: /File[/var/lib/puppet/lib/facter/profiles.rb]/ensure: defined content as '{md5}54c12303c601579fb2282304363c8425'
Info: Loading facts in /var/lib/puppet/lib/facter/profiles.rb
@sebnash
sebnash / site.pp
Last active December 15, 2015 02:19
Import module (for Getting Starter with Puppet 4) @grahamgilbert's code
node puppetclient {
include my_super_module
}
@sebnash
sebnash / site.pp
Last active December 15, 2015 02:09
ladmin 3 (for Getting Started With Puppet 3 repost)
node puppetclient {
user { 'ladmin':
ensure => 'present',
comment => 'Local Admin',
gid => '20',
groups => ['_appserveradm', '_appserverusr', '_lpadmin', 'admin'],
home => '/var/ladmin',
iteration => '21881',
password => '401e3aa796b3bfff2c8e929a003b727be1bd548aa0f0b0e131f0d11f3953162be210200a70872734a28be747a933e12e2458ffdcc60d209eab9e006a9f4042dc883148070e6e8ad05f4a5e5d44bd0ddfc9494482f0d16c9d5eb1de086183db1b89df9982d2856eeed431d65e03ff99177c3185aa61bc926b1a0020c49621ddd8',
salt => '0c3cd42b97d0b0df45542fcb5961a2920f2fd6204aa151bf08d762d9dd44fd0c',
@sebnash
sebnash / site.pp
Last active December 15, 2015 02:09
Hide sub-500 users exec (for Getting Started With Puppet 3 repost)
exec {'Hide sub-500 users':
command => "/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool TRUE",
}
@sebnash
sebnash / site.pp
Last active December 15, 2015 02:09
ladmin 2 (for Getting Started With Puppet 3 repost)
node puppetclient {
user { 'ladmin':
ensure => 'present',
comment => 'Local Admin',
gid => '20',
groups => ['_appserveradm', '_appserverusr', '_lpadmin', 'admin'],
home => '/var/ladmin',
iterations => '21881',
password => '401e3aa796b3bfff2c8e929a003b727be1bd548aa0f0b0e131f0d11f3953162be210200a70872734a28be747a933e12e2458ffdcc60d209eab9e006a9f4042dc883148070e6e8ad05f4a5e5d44bd0ddfc9494482f0d16c9d5eb1de086183db1b89df9982d2856eeed431d65e03ff99177c3185aa61bc926b1a0020c49621ddd8',
salt => '0c3cd42b97d0b0df45542fcb5961a2920f2fd6204aa151bf08d762d9dd44fd0c',