Skip to content

Instantly share code, notes, and snippets.

@konstruktoid
konstruktoid / mac_developer_certs.md
Last active March 3, 2022 00:25
Installing Developer ID certificates on Mac OS X

Installing Developer ID certificates on Mac OS X

Short guide showing how to install Developer ID certificates, when the Allow button doesn't show up under System Preferences > Security & Privacy > General or you're seeing (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8). in the installation logs (CMD + L).

System information

macOS Catalina
ProductName:    Mac OS X
ProductVersion: 10.15.4
@naoyamakino
naoyamakino / gist:5504445
Created May 2, 2013 18:53
Dissecting Ruby with Ruby via @schneems #railsConf
Code Triage: gemhttp://www.codetriage.com/
budle open gemName
puts caller.inspect #where it came from
object#method
object.method(:method_name).source_location
method.source_location
self.class.ancestors #get superclass names in order
require 'nokogiri'
RSpec::Matchers.define :have_xml do |xpath, text|
match do |body|
doc = Nokogiri::XML::Document.parse(body)
nodes = doc.xpath(xpath)
nodes.empty?.should be_false
if text
nodes.each do |node|
node.content.should == text
end
@adgedenkers
adgedenkers / vpn_connection.scpt
Created October 11, 2012 18:16
Toggle Connection to VPN on a Mac via AppleScript
tell application "System Events"
-- get current clipboard contents as a string
set CurrentClipboard to the clipboard as string
-- set the clipboad to your password
set the clipboard to "Y0urVPNPa$$w0rd"
-- start playing with the VPN
tell current location of network preferences
module Sass::Script::Functions
def user_color
color_values = options[:custom][:user].color.
scan(/^#?(..?)(..?)(..?)$/).first.
map {|num| num.ljust(2, num).to_i(16)}
Sass::Script::Color.new(color_values)
end
end