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
// | |
// slow_kvo_dictionary_example.m | |
// | |
// Created by Benedikt Terhechte on 07.12.11. | |
// appventure.me | |
// | |
#import <Foundation/Foundation.h> | |
int main (int argc, const char * argv[]) |
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
// Created by Benedikt Terhechte on 07.12.11. | |
// Appventure.me | |
// | |
#import <Foundation/Foundation.h> | |
#define AKeyPathDictionary(dictionary, A) [dictionary objectForKey:@A] | |
#define BKeyPathDictionary(dictionary, A, B) [AKeyPathDictionary(dictionary, A) objectForKey:@B] | |
#define CKeyPathDictionary(dictionary, A, B, C) [BKeyPathDictionary(dictionary, A, B) objectForKey:@C] | |
#define DKeyPathDictionary(dictionary, A, B, C, D) [CKeyPathDictionary(dictionary, A, B, C) objectForKey:@D] |
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 <Cocoa/Cocoa.h> | |
@interface NSDictionary (objectForKeyList) | |
- (id)objectForKeyList:(id)key, ...; | |
@end | |
@implementation NSDictionary (objectForKeyList) | |
- (id)objectForKeyList:(id)key, ... | |
{ |
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 | |
# go through the whole folder, and add all directories, that contain sourcecode | |
# Which directories to scan | |
directories = ("MyFantasticProject", "External", "libs") | |
def find_all_source_directories(parentDir): | |
def directories_contains_source(files): | |
for f in files: |
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
CREATE OR REPLACE FUNCTION url_insert_trigger() | |
RETURNS TRIGGER AS $$ | |
BEGIN | |
IF (ascii(NEW.url) in (115)) THEN | |
INSERT INTO urls_s VALUES (NEW.*); | |
ELSIF (ascii(NEW.url) in (97, 107)) THEN | |
INSERT INTO urls_ak VALUES (NEW.*); | |
ELSIF (ascii(NEW.url) in (98, 108)) THEN | |
INSERT INTO urls_bl VALUES (NEW.*); |
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
CREATE TABLE urls_s (CHECK (ascii(url) in (115))) INHERITS (urls); | |
CREATE TABLE urls_ak (CHECK (ascii(url) in (97, 107))) INHERITS (urls); | |
CREATE TABLE urls_bl (CHECK (ascii(url) in (98, 108))) INHERITS (urls); | |
CREATE TABLE urls_cj (CHECK (ascii(url) in (99, 106))) INHERITS (urls); | |
CREATE TABLE urls_de (CHECK (ascii(url) in (100, 101))) INHERITS (urls); | |
CREATE TABLE urls_fg (CHECK (ascii(url) in (102, 103))) INHERITS (urls); | |
CREATE TABLE urls_hiv (CHECK (ascii(url) in (104, 105, 118))) INHERITS (urls); | |
CREATE TABLE urls_mr (CHECK (ascii(url) in (109, 114))) INHERITS (urls); | |
CREATE TABLE urls_np (CHECK (ascii(url) in (110, 112))) INHERITS (urls); | |
CREATE TABLE urls_txzyo (CHECK (ascii(url) in (116, 120, 122, 121, 111))) INHERITS (urls); |
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
functions = {} | |
aes = require("resty.aes") | |
local ffi = require "ffi" | |
ffi.cdef[[ | |
int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, | |
const unsigned char *salt, int saltlen, int iter, | |
int keylen, unsigned char *out); | |
]] |
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
// | |
// AppDelegate.swift | |
// testasdfsadf | |
// | |
// Created by Benedikt Terhechte on 10/12/14. | |
// Copyright (c) 2014 Benedikt Terhechte. All rights reserved. | |
// | |
import Cocoa |
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
.iu-collection.cz-collection { | |
display: none !important; | |
visibility: hidden !important; | |
} | |
div.cz-container div.sc-push div.iu-collection { | |
display: none !important; | |
visibility: hidden !important; | |
} | |
.pm-category-active { | |
background-color: #000 !important; |
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 Foundation | |
// 1. Wildcard Pattern | |
func wildcard(a: String?) -> Bool { | |
guard case _? = a else { return false } | |
for case _? in [a] { | |
return true | |
} | |
OlderNewer