Skip to content

Instantly share code, notes, and snippets.

View dimapaloskin's full-sized avatar
:octocat:
>_

Dima Paloskin dimapaloskin

:octocat:
>_
View GitHub Profile
@rgcottrell
rgcottrell / gist:5b876d9c5eea4c9e411c
Created September 21, 2014 17:38
An FM Synthesizer in Swift using AVAudioEngine
import AVFoundation
import Foundation
// The maximum number of audio buffers in flight. Setting to two allows one
// buffer to be played while the next is being written.
private let kInFlightAudioBuffers: Int = 2
// The number of audio samples per buffer. A lower value reduces latency for
// changes but requires more processing but increases the risk of being unable
// to fill the buffers in time. A setting of 1024 represents about 23ms of
@astarasikov
astarasikov / gist:7794123
Created December 4, 2013 19:38
minimalistic OpenGL window in Objective-C
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <CoreVideo/CVDisplayLink.h>
@interface SxgeView : NSOpenGLView <NSWindowDelegate>
-(void)registerDisplayLink;
-(void)renderForTime:(CVTimeStamp)time;
-(void)windowWillClose:(NSNotification*)note;
@drhelius
drhelius / Game Boy Sound Operation
Last active August 16, 2023 02:31
Game Boy Sound Operation
Game Boy Sound Operation
------------------------
Shay Green (blargg)
[email protected]
http://www.slack.net/~ant/
** This is an incomplete draft
This documents the behavior of Game Boy sound; details which aren't
relevant to the observable behavior have been omitted unless they
@jeffrafter
jeffrafter / server.js
Created August 28, 2010 21:37
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('sys');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY";
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET";
function consumer() {