Skip to content

Instantly share code, notes, and snippets.

Christopher Liscio liscio

Block or report user

Report or block liscio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@liscio
liscio / retinaify.sh
Created Mar 12, 2015
Make Preview open your @2x .png files as if they are retina images
View retinaify.sh
#!/bin/sh
# First, set the width/height DPI on the file
sips -s dpiWidth 144 -s dpiHeight 144 "$1"
# Fake that it is a screen capture (wat?)
xattr -wx com.apple.metadata:kMDItemIsScreenCapture "62 70 6C 69 73 74 30 30 09 08 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09" "$1"
xattr -wx com.apple.metadata:kMDItemScreenCaptureType "62 70 6C 69 73 74 30 30 59 73 65 6C 65 63 74 69 6F 6E 08 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12" "$1"
xattr -wx com.apple.FinderInfo "00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00" "$1"
View gist:4207806
class Person:
p = Person()
p.name = "Foo"
In Ruby:
class Person
attr_accessor :name
View com.apple.itunes.metadata.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Major Version</key><integer>1</integer>
<key>Minor Version</key><integer>1</integer>
<key>Application Version</key><string>10.5b48</string>
<key>Features</key><integer>5</integer>
<key>Show Content Ratings</key><true/>
<key>Music Folder</key><string>file://localhost/Users/chris/Music/iTunes/iTunes%20Media/</string>
@liscio
liscio / pasteboard_types.txt
Created Jul 29, 2011
iTunes Pasteboard Types
View pasteboard_types.txt
(gdb) po [[sender draggingPasteboard] types]
<__NSArrayM 0x102912710>(
com.apple.pasteboard.promised-file-url,
dyn.ah62d4rv4gu8y6y4usm1044pxqzb085xyqz1hk64uqm10c6xenv61a3k,
NSPromiseContentsPboardType,
com.apple.itunes.iappurl,
CorePasteboardFlavorType 0x4855666C,
JRFS,
Dsid,
Oidl,
View frameworksBuildPhase.sh
${PROJECT_DIR}/bin/copyFrameworks.sh "SMUGFoundation.framework SMUGOpenCL.framework SMUGAudio.framework"
find "${BUILT_PRODUCTS_DIR}"/"${FRAMEWORKS_FOLDER_PATH}" -name '*.h' -exec rm {} \;
View copyFrameworks.sh
#!/bin/sh
# copyFrameworks.sh
# Capo
#
# Created by Christopher Liscio on 11-07-05.
# Copyright 2011 SuperMegaUltraGroovy. All rights reserved.
FRAMEWORKS=${1}
PRIVATE_FRAMEWORKS_PATH=${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}
View movieplayer
//
// videoTestMemoryViewController.h
// videoTestMemory
//
// Created by david on 06/10/10.
// Copyright 2010 E-ducation.it. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>
View CapoPlaybackButton.h
//
// CapoPlaybackButton.h
// Capo
//
// Created by Christopher Liscio on 9/22/10.
// Copyright (c) 2010 SuperMegaUltraGroovy. All rights reserved.
//
#import <UIKit/UIKit.h>
View gist:99897
Having trouble with Drag & Drop in Capo? Try this command in the Terminal:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed
And, if it still doesn't work after running that, reboot and try again.
And, it if still doesn't work after that, email support@supermegaultragroovy.com.
View gist:43876
%start PubSubRefresh::Idle
%class PubSubRefresh
%header PubSubRefresh.h
%map PubSubRefreshMap
%%
Idle
{
Start
You can’t perform that action at this time.