Skip to content

Instantly share code, notes, and snippets.

View variousauthors's full-sized avatar
🐢
Doubling Down

Various Authors variousauthors

🐢
Doubling Down
View GitHub Profile
@variousauthors
variousauthors / readme.txt
Created August 13, 2018 16:39
Exercice de Style (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created August 13, 2018 16:35
Exercice de Style (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created August 13, 2018 16:35
Exercice de Style (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created August 11, 2018 05:06
Exercice de Style (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created August 10, 2018 21:34
Tempting Fate (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / styled-redux.tsx
Created June 13, 2018 21:53
You need to add a className or the styles won't render
interface IBobProps {
name: string
}
class Bob extends React.PureComponent<IBobProps> {
render () {
<div>HELLO, {this.props.name}</div>
}
}
// this code is safe to copy/paste into your browser
// but you should really try to write it out line-by-line ;)
// this gist is based on a number of other excellent introductions to lambda calculus
// classic: https://github.com/sjsyrek/presentations/blob/master/lambda-calculus/lambda.js
// ornithology: https://www.youtube.com/watch?v=3VQ382QG-y4&t=3349s
// and this one, in Ruby, called "Programming With Nothing" (excellent title) https://www.youtube.com/watch?v=VUhlNx_-wYk
pair = x => y => a => a(x)(y)
@variousauthors
variousauthors / declarative.md
Last active March 29, 2018 17:21
Declarative

Preface: The Case for Map

In a declarative style the idea is to write code that describes what will be done, not how it will be done. My fav examples are from recursion:

const reverseString = (str) => {
  if (str.length < 2) return str
  
  const [first, ...rest] = str
 return reverseString(rest) + first
@variousauthors
variousauthors / gist:61b7202d4aff016746f1
Last active July 9, 2016 07:22
Infinite Parallax Starfield
love.viewport = require('libs/viewport').newSingleton()
local STAR_SEED = 0x9d2c5680;
local STAR_TILE_SIZE = 256;
local rshift, lshift, arshift, bxor, tohex = bit.rshift, bit.lshift, bit.arshift, bit.bxor, bit.tohex
-- Robert Jenkins' 96 bit Mix Function.
-- Taken from http://nullprogram.com/blog/2011/06/13/
local function mix (a, b, c)
@variousauthors
variousauthors / gist:ff9490f81a0e17b656a8
Created June 7, 2014 03:50
GameJolt API "Hello World"!
function do_socket_stuff ()
print("in")
local http = require("socket.http")
local ltn12 = require("ltn12")
local base_url = "http://gamejolt.com/api/game/v1"
--Helper for priniting nested table
function deep_print(tbl)
for i, v in pairs(tbl) do