Skip to content

Instantly share code, notes, and snippets.

@opatut
opatut / .gitignore
Last active March 3, 2023 18:49
OpenBikeSensor Configuration Flasher
spiffsgen.py
*/cfg.obs
*.spiffs
@opatut
opatut / foo.css
Created October 10, 2017 12:38
userstyle for asana
#asana_main {
background-image: linear-gradient(to bottom, #f6f8f9, #A2F4DF);
background: #333;
box-shadow: 0 0 6px #222 inset;
}
.Sidebar {
background: #2a2e46;
background: #222;
}
.SidebarHeader-asanaLogo {
# Maintainer: ELmoussaoui Bilal <[email protected]>
pkgname=gradio-git
_gitname=gradio
pkgver=5.0.0
pkgrel=3
pkgdesc='A GTK3 app for finding and listening to internet radio stations'
arch=('i686' 'x86_64')
license=('GPL3')
url="https://github.com/haecker-felix/gradio"
@opatut
opatut / setup.js
Created November 30, 2015 11:43
Mocha: Cannot combine --delay and --watch and --require hook
// setup.js
console.log('starting timeout');
setTimeout(function() {
console.log('timeout triggered, running suite');
run();
}, 1000);
@opatut
opatut / easing.js
Last active August 29, 2015 14:25 — forked from frederickk/easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
* Finally! Someone who understands we don't need to put the
* start, end, duration, etc. into the easing forumlae.
*/
var EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
# Data mining 2014, practical tutorial 5, example for
# *** Self-Organising Map ***
# Copyright agreement:
# Do whatever you want.
import numpy, scipy, sys, subprocess
iterations = int(sys.argv[2])
# set parameters
@opatut
opatut / vector.lua
Created March 21, 2014 21:20
vector.lua
local class = require("util/middleclass")
function assert_vector(v)
assert(v ~= nil and v:isInstanceOf(Vector))
end
Vector = class("Vector")
function Vector:initialize(x, y)
self.x = x or 0
@opatut
opatut / love-android-package
Created February 18, 2014 21:31
Android Löve2D debugging helper
#!/bin/bash
GAME=$1
DIR="/sdcard/love"
MIME="application/x-love-game"
INTENT="org.love2d.android/.GameActivity"
if [[ -z "$1" ]]; then
GAME="game.love"
echo "Creating game package at $GAME"
// Shortened version of this:
// http://www.bpfh.net/simes/computing/chroot-break.html
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
@opatut
opatut / random_static.cpp
Created June 3, 2011 16:27
c++0x random generator
#include <iostream>
#include <ctime>
#include <random>
class Random {
public:
static void Initialize() {
Generator.seed(time(0));
}