For archive purposes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Heavily inspired by http://www.mohiji.org/2012/12/14/lua-coroutines/ | |
require 'socket' | |
local WAITING_COROUTINES = {} | |
function waitForSeconds(seconds) | |
local milli = seconds * 1000 | |
local co = coroutine.running() | |
assert(co ~= nil, "Cannot wait on main thread") | |
local wakeuptime = socket.gettime() * 1000 + milli |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Licence: https://creativecommons.org/licenses/by-nc-sa/3.0/ | |
-- This is the shaders/init.lua file from mari0, updated for 0.10.0 | |
-- Original authors: Stabyourself.net - Maurice Guégan and Sašo Smolej | |
local supported = love.graphics.getSupported and love.graphics.getSupported("canvas") and love.graphics.getSupported("pixeleffect") | |
local supports_npo2 = love.graphics.getSupported and love.graphics.getSupported("npot") or false -- on the safe side | |
if not supported then | |
shaderssupported = false | |
print("post-processing shaders not supported") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# Usage: python pyGitDiff.py hash1 hash2 | |
# Help: python pyGitDiff.py -h | |
import subprocess | |
import os | |
import shutil | |
from datetime import datetime | |
import argparse | |
ignoreList = [".gitignore"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HubConnectionBuilder, LogLevel } from '@aspnet/signalr' | |
async function wait(ms: number) { | |
return new Promise(resolve => { | |
setTimeout(resolve, ms) | |
}) | |
} | |
const hubUrl = 'https://localhost:44360/testHub' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitter Video Download | |
// @namespace http://scambier.github.io/ | |
// @version 0.1 | |
// @description Adds an "Open video" link for tweets whith an embedded video | |
// @author Simon Cambier | |
// @match https://twitter.com/* | |
// @grant none | |
// @run-at document-idle | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- gobals and tools | |
left,right,up,down,fire1,fire2=0,1,2,3,4,5 | |
black,dark_blue,dark_purple,dark_green,brown,dark_gray,light_gray,white,red,orange,yellow,green,blue,indigo,pink,peach=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 | |
-- | |
-- simple ecs | |
-- https://github.com/namuol/pico8-ecs | |
-- | |
local ecs = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sunrect() | |
-- rainbow palette | |
pal({1,-15,-13,3,-5,11,-6,10,9,-7,8,-8},1) | |
-- origin x,y and radius | |
ox,oy,r=64,64,60 | |
::_:: | |
cls() | |
-- 12 points for the 12 colors | |
for i=1,12 do | |
-- the 12 points are equally spread on the circle's top half |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setting_sun() | |
-- set the palette with all the necessary color, | |
-- in the right order | |
pal({10,-7,8,-7,10,14,1},1) | |
-- circle radius | |
radius=40 | |
-- start loop | |
::_:: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
moves rectangle A by (dx, dy) and checks for a collision | |
with rectangle B. | |
if no collision occurs, returns false. | |
if a collision does occur, returns: | |
- the time within the movement when the collision occurs (from 0-1) | |
- the x component of the normal vector | |
- the y component of the normal vector |
OlderNewer