Skip to content

Instantly share code, notes, and snippets.

@wormeyman
wormeyman / OpenWithBrackets.bat
Last active January 19, 2022 20:33 — forked from mrchief/LICENSE.md
Run as administrator, when you right click on a file or folder it gives you the option to open in brackets. When you are done close the cmd window.
@echo off
SET st2Path=C:\Program Files (x86)\Brackets\Brackets.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Brackets" /t REG_SZ /v "" /d "Open with Brackets" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Brackets" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Brackets\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Brackets" /t REG_SZ /v "" /d "Open with Brackets" /f
#!/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
@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
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
anonymous
anonymous / html5videocanvas
Created February 23, 2012 00:55
HTML5 video canvas example - rocha.la
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* See working example at http://rocha.la/fun-with-pixels-html5-video-canvas
*
*/
var canvasVideo = function()
{
var $ = jQuery,