I hereby claim:
- I am angerman on github.
- I am angerman (https://keybase.io/angerman) on keybase.
- I have a public key whose fingerprint is D911 CD44 6398 8B80 97E1 7856 6A30 3B61 31E5 29AC
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Let’s alias a function that takes an int and does nothing with it. | |
typealias Action = Int -> () | |
// If something has an action, it's Actionable, no? I think so. But we’ll leave it optional if there actually *is* an action. | |
protocol Actionable { | |
var action: Action? { get } | |
} | |
// And obviously we need Things. We always need Things. | |
protocol Thing {} | |
// Now Items are Things that are Actionable. | |
struct Item: Thing, Actionable { |
class X : NSCoding { | |
@objc func encodeWithCoder(aCoder: NSCoder) {fatalError()} | |
@objc required init?(coder aDecoder: NSCoder) {fatalError()} | |
} | |
class B {} | |
class A<T>:X {} | |
class C:A<B> { | |
init(x:Int) {super.init()} | |
} |
powerset :: [a] -> [[a]] | |
powerset [] = [[]] | |
powerset (x:xs) = map (x:) (powerset xs) ++ powerset xs |
#!/usr/bin/env bash | |
source "${HALCYON_DIR}/src.sh" | |
post_build_hook () { | |
expect_vars HALCYON_BASE | |
local tag source_dir constraints | |
expect_args tag source_dir build_dir -- "$@" | |
label=$( get_tag_label "${tag}" ) |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
--- a/source3/lib/system.c 2011-10-18 20:48:48.000000000 +0200 | |
+++ b/source3/lib/system.c 2012-01-04 11:57:25.000000000 +0100 | |
@@ -1159,6 +1159,13 @@ | |
int groups_max(void) | |
{ | |
+ /* On OS X, sysconf(_SC_NGROUPS_MAX) returns 16 | |
+ * due to OS X's group nesting and getgrouplist | |
+ * will return a flat list; users can exceed the | |
+ * maximum of 16 groups. And easily will. |
<?php | |
/** | |
* Action Login | |
* | |
* Used to check if login is successful. | |
* Returns 200 OK upon success. | |
* Returns 401 Unauthorized upon fail. (May contain reason in | |
* X-Login-Error header) | |
* |
class UsersController < ApplicationController | |
respond_to :json | |
def index | |
@users = User.all | |
respond_with(@users) | |
end | |
def show | |
@user = User.find_by_id(params[:id]) |
def create | |
@name = params[:name] | |
@password = params[:password] | |
@email = params[:email] | |
if not @email | |
respond_with({}) | |
else | |
@user = User.create({:name => params[:name]}) | |
respond_with(@user, :location => users_url, :status => :created) | |
end |