Skip to content

Instantly share code, notes, and snippets.

View danielpunkass's full-sized avatar

Daniel Jalkut danielpunkass

View GitHub Profile
@danielpunkass
danielpunkass / LMWindow.m
Created March 25, 2021 14:12 — forked from mittsh/LMWindow.m
How to debug your key view loop: highlights
/*
* Copyright (c) 2013 Micha Mazaheri
* Released under the MIT License: http://opensource.org/licenses/MIT
*/
#define LMWindowDEBUGResponders
#ifdef LMWindowDEBUGResponders
static BOOL _showFirstResponderOverlay = YES;
#endif
@danielpunkass
danielpunkass / xcbuild-debugging-tricks.md
Created September 14, 2018 12:42 — forked from ddunbar/xcbuild-debugging-tricks.md
Xcode new build system debugging tricks

New Build System Tricks

Command Line

alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
# THIS DOESNT WORK YET: xcbuild openIDEConsole  # … then switch to Xcode ➡️
xcbuild showSpecs
xcbuild build <foo.pif> [—target <target>]
@danielpunkass
danielpunkass / _hg
Last active August 29, 2015 14:12 — forked from lies/_hg
#compdef hg
# Zsh completion script for mercurial. Rename this file to _hg and copy
# it into your zsh function path (/usr/share/zsh/site-functions for
# instance)
#
# If you do not want to install it globally, you can copy it somewhere
# else and add that directory to $fpath. This must be done before
# compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc
# file could look like this:
@danielpunkass
danielpunkass / _hg
Last active August 29, 2015 14:12 — forked from yuitowest/_hg
#compdef hg
# Zsh completion script for mercurial. Rename this file to _hg and copy
# it into your zsh function path (/usr/share/zsh/site-functions for
# instance)
#
# If you do not want to install it globally, you can copy it somewhere
# else and add that directory to $fpath. This must be done before
# compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc
# file could look like this:
@danielpunkass
danielpunkass / gist:2018752
Created March 11, 2012 23:57 — forked from rcw3/gist:2018059
Self-contained WWDC Status Checker Hack
#!/bin/bash
# run from terminal and you can watch it log as well... or nohup it
cd ~
testSiteForChanges ()
{
ls "old_page.html" 1>/dev/null 2>/dev/null
if [ $? -eq "1" ] ; then
/usr/local/bin/wget -q -O old_page.html $1
# Copies the selected tweet's URL from Twitter.app, and
# opens corresponding page for Aaron Swartz's Twitter Viewer.
#
# Original by John Gruber: https://gist.github.com/1440914
# This version by Daniel Jalkut
#
# I'm hooking this up to a keyboard shortcut specifically in Twitter.app,
# using my scripting utility FastScripts.
#
# Requires "Access for Assistive Devices" to be enabled.
//
// TextView.m
// TextDidChange
//
// Created by Timothy J. Wood on 10/27/09.
// Copyright 2009 The Omni Group. All rights reserved.
//
/*
@implementation JimPopUpButtonCell
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
NSRect rect = [self drawingRectForBounds: cellFrame];
rect.size.width -= 17; // chop off the popup indicator
NSSize imageSize = NSMakeSize(12, 12);
rect.origin.x += (rect.size.width - imageSize.width) / 2.0;