Update: feeling adventurous? Clone or fork the xkcd clock! If you just want to see it in action or get a glimpse of how it works, keep reading.
The date in [xkcd's comic number 1340][1] [does not change][2].
Update: feeling adventurous? Clone or fork the xkcd clock! If you just want to see it in action or get a glimpse of how it works, keep reading.
The date in [xkcd's comic number 1340][1] [does not change][2].
#lang racket | |
(require rackunit "hw5.rkt") | |
(require rackunit/text-ui) | |
(define hw5-tests | |
(test-suite | |
"Tests for HW 5" | |
(test-equal? "MUPL list -> Racket list #1" | |
(list (int 3) (int 4) (int 9)) |
#!/usr/bin/env python | |
""" | |
Python script that runs one-liner python scripts similarly to how Perl runs them | |
portions based on http://code.activestate.com/recipes/437932-pyline-a-grep-like-sed-like-command-line-tool/ | |
(Graham Fawcett, Jacob Oscarson, Mark Eichin) | |
interface inspired by Perl | |
""" |
{%- macro form_field_label(field) -%} | |
<label for="{{ field.id }}">{{ field.label.text }} | |
{%- if field.flags.required -%} | |
<abbr title="Diese Feld muss angegeben werden">*</abbr> | |
{%- endif %}</label> | |
{% endmacro %} | |
{%- macro form_field_description(field) -%} | |
{% if field.description %} | |
<span class="descr">{{ field.description }}</span> |
############################################################################ | |
# A more comprehensive drop-in replacement for Rails' internal link matcher regex | |
# which I invented from scratch... Oh yeah, Adderall is awesome. | |
# Takes about 40% longer to run than the stock auto_link regex in our test suite unfortunately :( | |
# but it accounts for pretty much EVERY linkable URI/URL, and is far more (in my opinion) | |
# readable and maintainable, due to its use of named groups/tokens. | |
# References used to build this: | |
# http://www.faqs.org/rfcs/rfc1738.html | |
# http://tools.ietf.org/html/rfc3986 | |
# http://en.wikipedia.org/wiki/URI_scheme << primary ref, was awesome, great diagram |
These commands were taking from the talk Introduction to Advanced Bash Usage by James Pannacciulli
Updated 21 Jan 2017 06:54:53
There are two JSON API styles:
The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.
The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.
;; Credits: | |
;; | |
;; * ClojureScript | |
;; * Reagent https://reagent-project.github.io/ | |
;; * Figwheel https://github.com/bhauman/lein-figwheel | |
;; * core.async https://clojure.github.io/core.async/ | |
;; * Christophe Grand's Life implementation http://clj-me.cgrand.net/2011/08/19/conways-game-of-life/ | |
(ns life.core | |
(:require [reagent.core :as r] |
Find it here: https://github.com/bitemyapp/learnhaskell
########################################################## | |
# How to NEVER use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda constru-# | |
# ct in Python 2.x. [DO NOT USE ANY OF THIS EVER] # | |
# by: e000 (13/6/11) # | |
########################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much anonymous "one line" functions |