Skip to content

Instantly share code, notes, and snippets.

View ArtBIT's full-sized avatar
🤖
Explore, Experiment, Evolve

ArtBIT ArtBIT

🤖
Explore, Experiment, Evolve
View GitHub Profile
@KeyMaster-
KeyMaster- / PhysBody.hx
Created April 4, 2015 22:16
Luxe rectangles physics engine (WIP, and very basic)
package ;
import luxe.Component;
import luxe.Rectangle;
import luxe.Vector;
class PhysBody {
public var rect:Rectangle;
public var vel:Vector;
public var acc:Vector;
@anissen
anissen / Main.hx
Last active March 26, 2016 16:53
Luxe kitchen sink test
import luxe.Component;
import luxe.Input;
import luxe.Parcel;
import luxe.ParcelProgress;
import luxe.Rectangle;
import luxe.Sprite;
import luxe.Color;
import luxe.tween.easing.*;
import luxe.Text;
@laclefyoshi
laclefyoshi / gist:744925
Created December 17, 2010 13:26
Arduino code for posting messages to im.kayac.com
/**
Copyright: (c) SAEKI Yoshiyasu
License : MIT-style license
<http://www.opensource.org/licenses/mit-license.php>
last updated: 2010/12/03
**/
#include <SPI.h>
#include <Ethernet.h>
#include <string.h>
@ArtBIT
ArtBIT / kako_ime_zvuči_uz_prezime
Created November 24, 2017 12:59
Poslušaj kako zvuči ime uz prezime, koristeći program `espeak`
#!/bin/bash
# Primer:
# bash kako_ime_zvuči_uz_prezime Kovačević
# ...Momčilo, Momčilo Kovačević
# ...Višeslav, Višeslav Kovačević
PREZIME=$1
for IME in $(cat muška.imena.txt); do
espeak -m -v sr "<prosody rate='0.7'>$IME</prosody><break time='1000' /><prosody rate='1'>$IME $PREZIME</prosody><break time='1000' />"
@AndreiRudenko
AndreiRudenko / SpatialHash.hx
Last active May 13, 2019 19:01
SpatialHash uniform-grid implementation
// SpatialHash uniform-grid implementation
// Broad-phase algorithm for collision detection
// Andrei Rudenko // SpatialHash.hx (24.07.2016)
import luxe.Vector;
import luxe.utils.Maths;
class SpatialHash {
public var min(default, null):Vector;
@erikhazzard
erikhazzard / gist:6602963
Created September 18, 2013 00:53
Install CUDA, OpenCL, and PyOpenCL on EC2 with Ubuntu 12.04
#!/bin/bash
sudo apt-get update
sudo apt-get install gcc
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_5.5-0_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1204_5.5-0_amd64.deb
sudo apt-get update
sudo apt-get install cuda
export PATH=/usr/local/cuda-5.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-5.5/lib64:$LD_LIBRARY_PATH
sudo apt-get install opencl-headers python-pip python-dev python-numpy python-mako
@aallan
aallan / speedtest-ifttt.sh
Last active May 29, 2022 15:50
Modified version of Henrik Bengtsson's speedtest-cli code which will dispatch the test results to the IFTTT Maker Channel.
#!/usr/bin/env bash
###########################################################################
# Originally written by: Henrik Bengtsson, 2014
# https://github.com/HenrikBengtsson/speedtest-cli-extras
# Modified to use IFTTT by: Alasdair Allan, 2015
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html]
###########################################################################
# Character for separating values
# (commas are not safe, because some servers return speeds with commas)
@dazld
dazld / hierarchy.php
Created March 23, 2012 19:43 — forked from devi/hierarchy.php
MySQL "Closure Table" for CodeIgniter based on Bill Karwin design.
<?php
/**
*
* CI / MySQL Closure Table Model
*
* @link http://www.slideshare.net/billkarwin/models-for-hierarchical-data
* @TODO improve
*
* sql schema:
@ugonnanwosu
ugonnanwosu / _cubic-bezier-easings.scss
Created September 25, 2015 09:31
Approximated penner equations for cubic-bezier css animation easings
///////////////////////////////////////////
// Animation Cubic Bezier easings //
// see - http://matthewlein.com/ceaser //
///////////////////////////////////////////
// defaults
$ease-linear: "cubic-bezier(0.250, 0.250, 0.750, 0.750)";
$ease-default: "cubic-bezier(0.250, 0.100, 0.250, 1.000)";
$ease-in: "cubic-bezier(0.420, 0.000, 1.000, 1.000)";
$ease-out: "cubic-bezier(0.000, 0.000, 0.580, 1.000)";
@mhawksey
mhawksey / gist:1170597
Created August 25, 2011 13:02
Google Apps Script to fill in a Document template with Spreadsheet data
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user