Skip to content

Instantly share code, notes, and snippets.

View thealgebraist's full-sized avatar
🎯
Focusing

The Algebraist thealgebraist

🎯
Focusing
  • Tabula rasa
  • Gakkel Ridge
View GitHub Profile
#!/bin/bash
f=$(pwd)
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x.png"
sips --resampleWidth 57 "${f}/${1}" --out "${f}/app-icon.png"
sips --resampleWidth 114 "${f}/${1}" --out "${f}/app-icon@2x.png"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/app-icon-29.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/app-icon-29@2x.png"
@phatak-dev
phatak-dev / README.md
Last active July 2, 2021 05:03
Functional Programming in C++

#Compilng You need g++ 4.9 to compile this code. Follow these steps to install g++-4.9

After installing run the following command to compile

/usr/bin/g++-4.9 -std=c++11 lambda.cpp

#Running

./a.out
@kseo
kseo / recon.ml
Last active March 28, 2024 14:41
A Hindley-Milner type inference implementation in OCaml
#! /usr/bin/env ocamlscript
Ocaml.ocamlflags := ["-thread"];
Ocaml.packs := [ "core" ]
--
open Core.Std
type term =
| Ident of string
| Lambda of string * term
| Apply of term * term
@ybakos
ybakos / GraphicGlDemoActivity.java
Created November 27, 2012 00:52
A simple example of using an Android Renderer to illustrate OpenGL ES boilerplate.
/* GraphicGlDemoActivity.java
* Author: Yong Bakos
* Since: 11/26/2012
* Thanks to:
* Cube: http://intransitione.com/blog/create-a-spinning-cube-with-opengl-es-and-android/
* OpenGL Boilerplate: http://www.jayway.com/2009/12/03/opengl-es-tutorial-for-android-part-i/
*/
package com.humanoriented.sudoku;
import java.nio.ByteBuffer;
@NicolasT
NicolasT / delimcc.ml
Created September 26, 2012 18:23
Delimited Continuations in OCaml
(* Boilerplate *)
(* Identity: id :: a -> a *)
let id = fun x -> x
(* Function composition: (.) :: (b -> c) -> (a -> b) -> a -> c *)
let (<.>) (f : 'b -> 'c) (g : 'a -> 'b) : 'a -> 'c =
fun x -> f (g x)
(* Cont type *)
type ('w, 'a) cont = Cont of (('a -> 'w) -> 'w)
@jjdelc
jjdelc / crayola.json
Created February 20, 2012 06:32
Crayola colors in JSON format
[
{
"hex": "#EFDECD",
"name": "Almond",
"rgb": "(239, 222, 205)"
},
{
"hex": "#CD9575",
"name": "Antique Brass",
"rgb": "(205, 149, 117)"
@jessedc
jessedc / iOS Icon.png bash script
Last active February 25, 2018 03:02
A simple bash script using OSX command line tool sips to resample a 1024x1024 image
#!/bin/bash
f=$(pwd)
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork"
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x"
sips --resampleWidth 57 "${f}/${1}" --out "${f}/Icon.png"
sips --resampleWidth 114 "${f}/${1}" --out "${f}/Icon@2x.png"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-Small.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/Icon-Small@2x.png"
sips --resampleWidth 50 "${f}/${1}" --out "${f}/Icon-Small-50.png"