Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@atleastimtrying
atleastimtrying / diatribe.txt
Last active August 29, 2015 13:56
The mistakes of 'code', 'hacker' and 'hacking'.
The mistakes of the words 'code', 'hacker' and 'hacking'
========================================================
As someone who habitually and professionally spends time writing computer programs and web sites using
a variety of programming languages, there are a few phrases that irk me as I feel that they poorly
represent the joyful, creative experience that is creating systems within a computer. The majority of
my issues are based around the associated semantics of the words used.
---
'code' - A code is something written to conceal or hide away. it is something that is secret to be
broken or discovered. Writing computer programs is primarily a means of expressions of ideas,
instructions or intents. These instructions are increasingly written to be more and more legible to
@ToJans
ToJans / main.hs
Last active January 4, 2016 19:50
Zalora task
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Web.Scotty
import Network.Wai.Middleware.RequestLogger(logStdoutDev)
import Data.Aeson ( (.:),(.:?),decode,FromJSON(..),Value(..))
import Data.Text.Lazy (pack)
import Control.Applicative ((<$>), (<*>))
import qualified Data.ByteString.Lazy.Char8 as BS
@ToJans
ToJans / InventoryItems.hs
Last active January 19, 2024 10:47
Haskell implementation of Greg Young's CQRS sample: https://github.com/gregoryyoung/m-r Love the sheer elegance of Haskell; no need for all that infrastructure crap
module InventoryItems(Command(..), Event(..), handle) where
import Data.Maybe(isJust)
type Id = String
type Name = String
type Amount = Int
data Command = CreateInventoryItem Id
| RenameInventoryItem Id Name
@cgrand
cgrand / comprehensions.clj
Created May 24, 2013 14:06
Comprehension framework, upon which are (re)implemented, for, doseq, reducible/foldable for and reduce-based doseq
;; I wrote this in the Eurostar on my way back from the last lambdanext.eu clojure course.
(ns comprehensions
(:refer-clojure :exclude [for doseq])
(:require [clojure.core.reducers :as r]))
;; borrowed from clojure.core
(defmacro ^{:private true} assert-args
[& pairs]
`(do (when-not ~(first pairs)
@artero
artero / launch_sublime_from_terminal.markdown
Last active January 25, 2024 16:57 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

Objective-C Coding Convention and Best Practices

Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.

This document is mainly targeted toward iOS development, but definitely applies to Mac as well.

Operators

NSString *foo = @"bar";
@kogakure
kogakure / .gitignore
Last active December 17, 2023 08:21
Git: .gitignore file for LaTeX projects
*.acn
*.acr
*.alg
*.aux
*.bak
*.bbl
*.bcf
*.blg
*.brf
*.bst