Skip to content

Instantly share code, notes, and snippets.

Okke Timm okket

Block or report user

Report or block okket

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
@okket
okket / AVAudioEngine.swift
Last active Dec 27, 2017
AVAudioEngine in Playground
View AVAudioEngine.swift
// AVAudioEngine Playground - requires OS X 10.10
import Cocoa
import AVFoundation
// Keep playground running
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely(continueIndefinitely: true)
// Setup engine and node instances
var engine = AVAudioEngine()
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
View application.controller.js
import Ember from 'ember';
var counter=1;
export default Ember.Controller.extend({
model: [{id: 2, mark: 'blue'},{id: 1, mark: 'red'}],
appName: 'Ember Twiddle',
count: counter,
shipmentType: 'regularDelivery',
actions: {
View WebKit.swift
// WebKit Window in 30 lines of Swift code
// see http://practicalswift.com/2014/06/27/a-minimal-webkit-browser-in-30-lines-of-swift/
import Cocoa
import WebKit
let application = NSApplication.sharedApplication()
application.setActivationPolicy(NSApplicationActivationPolicy.Regular)
let window = NSWindow(contentRect: NSMakeRect(0, 0, 800, 600), styleMask: NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask, backing: .Buffered, defer: false)
window.center()
window.title = "Minimal Swift WebKit Browser"
@okket
okket / Links
Last active Jan 27, 2016
WWDC 2015 HD Videos Download Links
View Links
@okket
okket / gist:fca8983296c031ea4eb6
Last active Aug 29, 2015
libvirt get ip address
View gist:fca8983296c031ea4eb6
# Method 1:
#
# https://rwmj.wordpress.com/2010/10/26/tip-find-the-ip-address-of-a-virtual-machine/
arp -an | grep $(virsh dumpxml $VIRTUAL_MACHINE_NAME | grep '<mac' | grep -o '\([0-9a-f][0-9a-f]:\)\+[0-9a-f][0-9a-f]') | grep -o '\([0-9]\{1,3\}\.\)\+[0-9]\{1,3\}'
# Method 2: (needs guest-agent)
#
# http://dustymabe.com/2013/07/14/find-guest-ip-address-using-qemu-guest-agent/
View Dockerfile
FROM iojs:1.5.0
RUN npm install -g bower
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY bower.json /usr/src/app/
RUN bower install --allow-root
You can’t perform that action at this time.