Skip to content

Instantly share code, notes, and snippets.

View x0x8x's full-sized avatar
🏠
Working from home

x0x8x x0x8x

🏠
Working from home
View GitHub Profile
@x0x8x
x0x8x / PagerDuty_Migration.js
Created May 12, 2017 09:56 — forked from baskarp/PagerDuty_Migration.js
Migration script to move from legacy PagerDuty update set integration to the new Fuji ServiceNow store app
/*
* Must be run from backgroup script as a user with the elevated security_admin role
*/
// migrate incident id values
migrateIncidents();
// migrate group attributes from legacy update set application to the new Fuji store app
migrateGroups();
@x0x8x
x0x8x / import_users.rb
Created May 12, 2017 09:56 — forked from baskarp/import_users.rb
A simple Ruby script to import users into PagerDuty from a CSV file
#!/usr/bin/env ruby
require 'rubygems'
require 'faraday'
require 'json'
require 'csv'
class PagerDutyAgent
attr_reader :requester_id
attr_reader :token
#!/usr/bin/env ruby
# Ruby script to create recurring maintenance windows in PagerDuty
#
# Copyright (c) 2012, PagerDuty, Inc. <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
@x0x8x
x0x8x / mirror_incident.rb
Created May 12, 2017 09:56 — forked from baskarp/mirror_incident.rb
Ruby script to mirror an email incident as an API incident in PagerDuty
#!/usr/bin/env ruby
# Ruby script to mirror an email incident as an API incident
#
# Copyright (c) 2011, PagerDuty, Inc. <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
@x0x8x
x0x8x / pagerduty.bat
Created May 12, 2017 09:56 — forked from baskarp/pagerduty.bat
Invoke PagerDuty using cURL from Windows
@echo off
:: Download cURL with SSL support from here: http://www.paehl.com/open_source/?CURL_7.28.0:
:: Extract curl.exe in the same directory as this bat file
:: Usage: pagerduty.bat service_key event_type description incident_key
:: event_types = (trigger | acknowledge | resolve)
::
set service_key=%1
set service_key=%service_key:"=\"%
set event_type=%2
set event_type=%event_type:"=\"%
@x0x8x
x0x8x / quick_ack.rb
Created May 12, 2017 09:56 — forked from baskarp/quick_ack.rb
A script to quickly ack a PagerDuty incident by incident number
#
#
# How to use this script:
#
# 1) You'll need to have Ruby installed on your machine.
# Follow these instructions to install Ruby on your machine: https://docs.google.com/document/pub?id=1Eo3f77CC1Flkb2f71ro-NZCYK2VuA6ajxvcuTGG_c6Q
#
# 2) Once Ruby is installed, run the following from your command prompt:
# gem install faraday --no-ri --no-rdoc
#
@x0x8x
x0x8x / pagerduty_opsview.pl
Created May 12, 2017 09:56 — forked from baskarp/pagerduty_opsview.pl
PagerDuty Nagios plug-in with support for OpsView
#!/usr/bin/env perl
# Nagios plugin that sends Nagios events to PagerDuty.
#
# Copyright (c) 2011, PagerDuty, Inc. <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@x0x8x
x0x8x / README.md
Created June 3, 2017 23:12 — forked from balupton/README.md
Convert XPS to PDF on Linux and Mac using bash

Convert XPS to PDF on Linux and Mac

Add the xps2pdf.sh contents to your bashrc file. If you don't know what that means, then run the following:

curl -fsSL https://gist.githubusercontent.com/balupton/7f15f6627d90426f12b24a12a4ac5975/raw/xps2pdf.sh | bash

Use like so:

@x0x8x
x0x8x / re-sign-ios-app.md
Created June 12, 2017 02:17 — forked from chaitanyagupta/re-sign-ios-app.md
How to re-sign an iOS app with another developer account

To re-sign an iOS app with another developer account, ensure that the following are in place first.

  1. Distribution certificate of the other developer account
  2. A provisioning profile from the other developer account

Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier from one account can't be used in a different account, even though the team id/prefix would be different.

Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.

  1. Unzip the .ipa. This will usually unzip to Payload/.app/