Skip to content

Instantly share code, notes, and snippets.

@courajs
courajs / click.c
Created April 6, 2022 21:57 — forked from rsp/click.c
// Compile instructions:
//
// gcc -o click click.c -Wall -framework ApplicationServices
#include <ApplicationServices/ApplicationServices.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
int x = 0, y = 0, n = 1;
float duration = 0.1;
@courajs
courajs / chatServer.js
Created September 8, 2017 17:48 — forked from creationix/chatServer.js
A simple TCP based chat server written in node.js
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client
@courajs
courajs / controllers.application.js
Created April 26, 2017 20:25 — forked from machty/controllers.application.js
ember-concurrency starter
import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
myTask: task(function * () {
let didConfirm = yield this.get('getConfirmation').perform("Are you sure?");
if (didConfirm) {
alert("woot");