Skip to content

Instantly share code, notes, and snippets.

public class Interesting…
public void interestingFunction() {
if(collaborator.checkSomething()) {
//do something
}
else {
//do something else
}
}
@mhct
mhct / example
Created February 20, 2018 12:50
/*
* Copyright (c) 1999-2001,2005-2012 Apple Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
test=bla
date: 01/06/2016
time: 20:41
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=45 time=2152 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=45 time=3158 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=45 time=3414 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=45 time=4318 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=45 time=5050 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=45 time=4405 ms
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....
pushd /var/lib/dkms/hso/1.9/build; make KSRC=/usr/lib/modules/3.6.11-12-ARCH+/build KVER=3.6.11-12-ARCH+; popd.........
Error! Build of hso.ko failed for: 3.6.11-12-ARCH+ (armv6l)
Consult the make.log in the build directory
/var/lib/dkms/hso/1.9/build/ for more information.
[root@alarmpi ~]# cat /var/lib/dkms/hso/1.9/build/make.log
@mhct
mhct / gist:2421721
Created April 19, 2012 15:28
That is not the way to go.... testing asynchronous code execution
it 'should offer rideOffer to 2 taxis (see the Mock above)', (done) ->
client1 = io.connect socketUrl, options
taxi1 = io.connect socketUrl, options
taxi2 = io.connect socketUrl, options
async.parallel([
(fn) ->
taxi1.emit('locationUpdate', {locationUpdate:{taxiId:1}})
fn()
,