Skip to content

Instantly share code, notes, and snippets.

@notlion
notlion / .clang-format
Last active March 15, 2020 06:51
Cinder ClangFormat
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: false
AlignConsecutiveAssignments: false
AlignEscapedNewlinesLeft: false
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
@notlion
notlion / BlockTimer.cpp
Last active December 23, 2015 04:27
ci::audio BlockTimer
#include "BlockTimer.hpp"
using namespace cinder;
class FnNode : public audio::Node {
std::function<void()> mFunc;
protected:
void process(audio::Buffer *buffer) override {
mFunc();
//
// main.swift
// Test
//
// Created by Chris Eidhof on 29/08/15.
// Copyright © 2015 Chris Eidhof. All rights reserved.
//
import Foundation
import Quartz
@ayanonagon
ayanonagon / Locale.playground
Created October 19, 2014 20:31
Changing the locale in a Swift playground
import UIKit
extension NSLocale {
class func currentLocale() -> NSLocale {
return NSLocale.localeWithLocaleIdentifier("en_GB");
}
}
NSLocale.currentLocale().localeIdentifier
@num3ric
num3ric / ColorPalette.cpp
Last active August 29, 2015 14:05
Color palette generator
#include "ColorPalette.h"
#include "cinder/CinderAssert.h"
#include "cinder/Rand.h"
#include <algorithm>
#include <numeric>
using namespace ci;
using namespace col;
@joshuajnoble
joshuajnoble / binding.gyp
Last active September 23, 2020 04:01
Install "node-gyp", compile with "node-gyp configure build", voila.
{
"targets": [
{
"target_name": "keypress",
"conditions": [
['OS == "mac"', {
'include_dirs': [
'System/Library/Frameworks/CoreFoundation.Framework/Headers',
'System/Library/Frameworks/Carbon.Framework/Headers',
],
@lab101
lab101 / TranscendSDWifi
Last active December 26, 2015 17:18
Loading images from a Transcend SD wifi in Cinder.
//
// TranscendSDWifi.h
// Puppeteer
//
// Created by Kris Meeusen on 28/08/13.
//
//
#ifndef __Puppeteer__TranscendSDWifi__
#define __Puppeteer__TranscendSDWifi__
@ajstarks
ajstarks / DejaVuSans.inc
Created July 29, 2012 04:12
shapes: draw random shapes using OpenVG (Raspberry pi version)
/* Generated by font2openvg. See http://developer.hybrid.fi for more information. */
/* converted from font file /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf */
/* font family name: DejaVu Sans */
/* font style name: Book */
static const unsigned char DejaVuSans_glyphInstructions[4753] = {
2,4,4,4,4,0,2,4,4,4,4,4,4,0,2,4,4,4,4,0,
2,4,4,4,4,0,2,4,4,4,4,0,2,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
// shapes: minimal program to explore OpenVG
// Anthony Starks ([email protected])
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
#include "VG/openvg.h"
#include "VG/vgu.h"
#include "EGL/egl.h"
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)