Skip to content

Instantly share code, notes, and snippets.

@shevabam
shevabam / Seconds to human readable text.php
Last active October 21, 2015 08:01
SecondsToHumanReadableText
<?php
/**
* Seconds to human readable text
* Eg: for 36545627 seconds => 1 year, 57 days, 23 hours and 33 minutes
*
* @return string Text
*/
function getHumanTime($seconds)
{
@sonnym
sonnym / random_grid.elm
Created December 13, 2014 00:28
Crash elm
import Signal ((<~), Signal)
import Signal
import List ((::))
import List
import Time
import Random
import Color (rgb)
@TheSeamau5
TheSeamau5 / SimpleRotatingCube.elm
Created December 5, 2014 06:03
Simple Rotating Cube in Elm
import Graphics.WebGL (..)
import Math.Vector3 (..)
import Math.Matrix4 (..)
type Attribute = {position : Vec3}
type Uniform = { rotationMatrix : Mat4}
type Varying = {}
mapMesh : (a -> b) -> [Triangle a] -> [Triangle b]
mapMesh = map << mapTriangle