Skip to content

Instantly share code, notes, and snippets.

@YesThatAllen
YesThatAllen / pkgresign.c
Created June 7, 2021 20:04 — forked from kurash/pkgresign.c
Add RSA signature to OSX packages (pkg)
/*
(c) 2012-2016 Sassafras Software Inc.
Provided "as is" under the terms of the MIT license, no warranty, use at your own risk
*/
/*
to build:
cc pkgresign.c -framework Security -framework CoreFoundation -lxar -o pkgresign
*/
@YesThatAllen
YesThatAllen / Makefile
Created July 12, 2019 20:02
Mac app notarization from the command line
.PHONY: notarize
SIGNING_CERTIFICATE := $(shell security find-certificate -Z -c "Developer ID Application:" | grep "SHA-1" | awk 'NF { print $$NF }')
TEAM_ID := $(shell security find-certificate -c "Developer ID Application:" | grep "alis" | awk 'NF { print $$NF }' | tr -d \(\)\")
EXPORT_PATH := $(XCS_ARCHIVE)/Submissions
BUNDLE_APP := $(EXPORT_PATH)/NewMacApp.app
BUNDLE_ZIP := $(EXPORT_PATH)/NewMacApp.zip
UPLOAD_INFO_PLIST := $(EXPORT_PATH)/UploadInfo.plist
REQUEST_INFO_PLIST := $(EXPORT_PATH)/RequestInfo.plist
AUDIT_INFO_JSON := $(EXPORT_PATH)/AuditInfo.json
@YesThatAllen
YesThatAllen / common_functions.rb
Last active July 8, 2018 22:16 — forked from srpomeroy/common_functions.rb
Commonly used functions in RightScale CATs In order to create a URL link to a server, you need to grab what is called the `legacy_id`. This property is currently only available in API 1.6: http://reference.rightscale.com/api1.6/index.html#/1.6/controller/V1_6-Definitions-Instances Check out the `get_server_access_link` definition in the followin…
# Required prolog
name 'LIB - Common functions'
rs_ca_ver 20160622
short_description "Common functions"
package "common/functions"
# Checks if the account supports the selected cloud
define checkCloudSupport($cloud_name, $param_location) do
# Gather up the list of clouds supported in this account.
@YesThatAllen
YesThatAllen / github_issues_to_csv.py
Created May 4, 2018 03:43 — forked from patrickfuller/github_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
Exports issues from a list of repositories to individual csv files.
Uses basic authentication (Github username + password) to retrieve issues
from a repository that username has access to. Supports Github API v3.
Forked from: unbracketed/export_repo_issues_to_csv.py
"""
import argparse
import csv
from getpass import getpass
import requests
@YesThatAllen
YesThatAllen / git-recover-branch.md
Created December 16, 2016 02:11 — forked from jbgo/git-recover-branch.md
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
Instructions for clearing expired DigiCert SSL certificate on OSX
NOTICE: The following instructions “worked for me.” Proceed at your own risk.
Symptoms:
* Visiting several sites, such as github, gravatar, twitter’s CDN results in “invalid certificate” errors
* For example: http://i.imgur.com/8gPRfI3.png
## Instructions
tester105-vm (172.16.46.105)
total 8
drwxr-xr-x 5 root wheel 170 Dec 28 07:24 .
drwxr-xr-x 6 root wheel 204 Dec 28 07:24 ..
drwxr-xr-x 8 root wheel 272 Dec 28 11:46 2.3
drwxr-xr-x 11 root wheel 374 Dec 28 12:48 2.5
lrwxr-xr-x 1 root wheel 3 Dec 28 07:24 Current -> 2.5