Skip to content

Instantly share code, notes, and snippets.

View skyfallsin's full-sized avatar

Pradeep Elankumaran skyfallsin

View GitHub Profile
@skyfallsin
skyfallsin / CGSPrivate.h
Created June 12, 2024 04:49 — forked from rjw57/CGSPrivate.h
CGSPrivate.h - undocumented APIs for OSX. Re-licensed under MIT licence.
/* CGSPrivate.h -- Header file for undocumented CoreGraphics stuff. */
/* This file is a relicensed portion of DesktopManager and was originally released under
* the terms of the GNU General Public Licence. Original licence text follows the new terms.
* The contents of this file has been re-released by the original author under the following terms:
*
* Copyright (C) 2003, 2004, 2013 Richard J Wareham <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
@skyfallsin
skyfallsin / macOS_SytemPrefs.md
Created May 25, 2024 04:28 — forked from rmcdongit/macOS_SytemPrefs.md
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@skyfallsin
skyfallsin / ai-guide-pick-a-model-test-a-model.ipynb
Created September 19, 2023 17:50
AI Guide - pick a model, test a model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
div
&#rocket_space
width: 750px
height: 500px
background: url("/images/background.png") no-repeat
&.rocket_background
position: absolute
left: 200px
top: 120px
@ctx = canvas.getContext("2d")
@ctx.strokeStyle = "rgba(0,212,255,1.0)"
@ctx.lineWidth = 12.0
@ctx.beginPath()
@ctx.arc(172, 118, 90, Math.PI, arcMultiplier*Math.PI, false)
@ctx.stroke()
@ctx.closePath()
merb : worker (port 4000) ~ Started request handling: Sat Dec 06 08:27:40 -0800 2008
merb : worker (port 4000) ~ Routed to: {"format"=>nil, "action"=>"show", "id"=>"1", "controller"=>"products"}
merb : worker (port 4000) ~ Params: {"format"=>nil, "action"=>"show", "id"=>"1", "controller"=>"products"}
merb : worker (port 4000) ~ undefined local variable or method `params' for #<ParseTreeArray:0x2575e48> - (NameError)
/usr/local/lib/ruby/gems/1.8/gems/merb-action-args-1.0.3/lib/merb-action-args/get_args.rb:52:in `get_args'
/usr/local/lib/ruby/gems/1.8/gems/merb-action-args-1.0.3/lib/merb-action-args/get_args.rb:51:in `eval'
/usr/local/lib/ruby/gems/1.8/gems/merb-action-args-1.0.3/lib/merb-action-args/get_args.rb:52:in `get_args'
/usr/local/lib/ruby/gems/1.8/gems/merb-action-args-1.0.3/lib/merb-action-args/get_args.rb:51:in `each'
/usr/local/lib/ruby/gems/1.8/gems/merb-action-args-1.0.3/lib/merb-action-args/get_args.rb:51:in `get_args'
/usr/local/lib/ruby/gems/1.8/gems/merb-action-args-1.0.3/lib/merb-ac
module Footnoted
def self.included(base)
base.class_eval do
has_many :annotations, :as => :notable, :dependent => :delete_all
has_one :footnote, :through => :annotations
before_save :save_footnote
# before_destroy :destroy_annotations
attr_accessor :footnote_id
end