This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/macruby | |
| applicationPath = '/Applications/Mail.app' | |
| p NSBundle.bundleWithPath(applicationPath).bundleIdentifier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MountNotification | |
| def initialize(anNSNotification) | |
| @nsNotification = anNSNotification | |
| end | |
| def name() | |
| 'NSWorkspaceDidMountNotification' | |
| end | |
| def workspace() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class WakeNotification | |
| def initialize(anNSNotification) | |
| @nsNotification = anNSNotification | |
| end | |
| def name() | |
| 'NSWorkspaceDidWakeNotification' | |
| end | |
| def workspace() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Transcript cr; cr; cr. | |
| FileStream readOnlyFileNamed: '/path/to/file.ext' do: [ :f | | c | | |
| [f atEnd] whileFalse: [ | |
| c := f next. | |
| (({(33 to: 47). (58 to: 64). (91 to: 96).} anySatisfy: [ :range | range includes: c asciiValue ]) or: [ c asciiValue > 126 ]) | |
| ifTrue: [ | |
| Transcript | |
| show: 'At ', f position asString; tab; | |
| show: 'Character ', c asString; tab; | |
| show: 'Code ', c asciiValue asString; cr] ]]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| XMLRPCServerRequest classVarNamed: #Receivers keysDo: [ :s | XMLRPCServerRequest removeService: s ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| to make_new_project(project_name) | |
| tell application "Xcode" to activate | |
| tell application "System Events" | |
| tell process "Xcode" | |
| click menu item "New Project…" of menu 1 of menu bar item "File" of menu bar 1 | |
| tell window "New Project" | |
| -- row 8 is empty project, 4 is Cocoa App | |
| select row 4 of outline 1 of scroll area 1 of splitter group 1 of group 1 | |
| click button "Cocoa Application" of radio group 1 of scroll area 1 of splitter group 1 of splitter group 1 of group 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| activate application "Captive Network Assistant" | |
| tell application "System Events" | |
| tell process "Captive Network Assistant" | |
| tell UI element 1 of scroll area 1 of window "Join “central”" | |
| set value of text field 1 of group 12 to "" | |
| set value of text field 1 of group 14 to "" | |
| click button "Submit" of group 16 | |
| end tell | |
| end tell | |
| end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "Place Pharo 1.3 or 1.4 image, changes, and sources in build directory of cog vm sources. Then doit:" | |
| Gofer new | |
| squeaksource: 'MetacelloRepository'; | |
| package: 'ConfigurationOfCog'; | |
| load. | |
| (Smalltalk at: #ConfigurationOfCog) project lastVersion load. | |
| "Pick a VM e.g. CogMacOSConfig or StackCocoaIOSConfig" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Usage: | |
| ./vimeo.rb video-id [password] [output filename, no extension] | |
| Known issues: | |
| I should put some better arg handling in, if you download a video w/ password it will use the password as output filename. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| oldPackageName := 'LivingCode-bdd extensions'. | |
| newPackageName := 'BDDExtensions'. | |
| package := PackageInfo named: oldPackageName. | |
| extendedClasses := package extensionMethods collect: [ :e | e methodClass ] as: Set. | |
| extendedClasses do: [ :c | c organization renameCategory: '*', oldPackageName toBe: '*', newPackageName ]. |