Skip to content

Instantly share code, notes, and snippets.

@celoyd
celoyd / slitscan.py
Last active October 27, 2024 20:19
Simple but reasonably flexible
#!/usr/bin/env python
"""Simple slitscan generator
$ slitscan.py source slice destination
Where:
- source is a video or a directory of images;
- slice is either "c" for column or "r" for row
and an integer, e.g., r1 or c42; and
<?php
// Basically a strict object with no methods
class Struct {
public $foo;
public $bar;
}
$struct = new Struct(['foo' => 'something']); // constructor args would get pushed to properties ???
$struct->foo = 'whatever';
@dcousineau
dcousineau / gulpfile.js
Created April 9, 2015 14:07
Gulp Build System
"use strict";
var _ = require('underscore')
, nodeResolve = require('resolve')
, gulp = require('gulp')
, gutil = require('gulp-util')
, browserify = require('browserify')
, watchify = require('watchify')
, babelify = require('babelify')
, source = require('vinyl-source-stream')
@kwylez
kwylez / gist:5337918
Last active March 2, 2020 06:09
Example implementation of listening for iTunes/Spotify track changes and displaying information in the NotificationCenter. Article reference: http://blog.corywiles.com/now-playing-with-spotify-and-itunes
//
// AppDelegate.m
//
//
// Created by Cory D. Wiles on 10/8/12.
// Copyright (c) 2013 Cory D. Wiles. All rights reserved.
//
#import "AppDelegate.h"
#import "iTunes.h"
@ncb000gt
ncb000gt / elasticsearch-index-config.js
Created March 10, 2011 15:40
Elastic search configuration with a custom analyzer.
{
settings: {
number_of_shards: 5,
number_of_replicas: 1,
"index" : {
"analysis" : {
"analyzer" : {
"html" : {
filter: [ 'standard', 'lowercase', 'stop', 'asciifolding' ],
"tokenizer" : "standard",
@sanxiyn
sanxiyn / lisp.c
Created August 14, 2010 04:16
Lisp
#include <assert.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
enum type {
NIL,