Skip to content

Instantly share code, notes, and snippets.

View sebnash's full-sized avatar

Seb Nash sebnash

View GitHub Profile
@sebnash
sebnash / gist:3851742
Last active May 1, 2020 12:51
Disable Meraki System Manager client remote desktop, screenshots (OS X)
curl -L --create-dirs -o /etc/meraki/ci.conf http://dl.meraki.net/sm/ci.conf

Keybase proof

I hereby claim:

  • I am sebnash on github.
  • I am sebnash (https://keybase.io/sebnash) on keybase.
  • I have a public key ASC0EiIBSEHaUXgEIQFDPylV3SFhPq-339oJmcg3VpUOCAo

To claim this, I am signing this object:

@sebnash
sebnash / gist:43a5d990a18065019409
Last active February 16, 2018 18:02
Contents of Huawei’s ‘Mobile Partner.app’ installer
$ pkgutil --files huawei.com.hwnetmgr.hwnetmgr.pkg
HWNetCfg
HWNetMgr
StartupParameters.plist
$ pkgutil --files com.huawei.hwportdetect.pkg
HWPortCfg
config
$ pkgutil --files com.huawei.MobilePartner
mobilepartner.app
mobilepartner.app/Contents
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",
}