Skip to content

Instantly share code, notes, and snippets.

@ohbargain
ohbargain / LeakyCALayerViewController.swift
Created September 21, 2016 11:22
CALayer as SCNMaterial content leaks...
import Cocoa
import SceneKit
class ViewController: NSViewController {
@IBOutlet weak var sceneView: SCNView!
@IBOutlet weak var loadButton: NSButton!
override func viewDidLoad() {
super.viewDidLoad()
loadButton.target = self
From fbcac32402279c0d3a94e82e1e618c9d416220fd Mon Sep 17 00:00:00 2001
From: Seil Oh <hardboiledbaby@gmail.com>
Date: Sat, 11 Apr 2015 23:25:37 +0900
Subject: [PATCH] fixed autogen script to work with osx-homebrew system
---
autogen.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autogen.sh b/autogen.sh
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Reactive Property</Title>
<Shortcut>propr</Shortcut>
<Description>Creates a property that calls RaiseAndSetIfChanged</Description>
<Author>Anderson Imes</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/tmux-for-iTerm2-20130319.tar.gz'
md5 'f15d9f567b9b029482bb7b3227ee7ac3'
homepage 'http://code.google.com/p/iterm2/downloads/detail?name=tmux-for-iTerm2-20120108.tar.gz&can=2&q='
depends_on 'libevent'
def install
@ohbargain
ohbargain / hack.sh
Created March 31, 2012 13:54 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@ohbargain
ohbargain / machine_model.py
Created January 29, 2012 04:12
Django Model Forward Declaration
class Quotations(models.Model):
quoted_date = models.DateField(verbose_name="Quoted Date")
price = models.FloatField(verbose_name="Quoted Price")
machine = models.ForeignKey('Machine', verbose_name = "Associated Machine")
def __unicode__(self):
return u"%s %s" %(self.machine.name,self.quoted_date,self.price)
class Machine(models.Model):
name = models.CharField(max_length = 30)