This file contains hidden or 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
handleResponseReady: function(response) { | |
try { | |
if(AuthToken.isChanged(this.token)) { | |
this._response.setHeader('Set-Cookie', AuthCookie.cookieFromToken(this.token)); | |
} | |
this._response.setHeader('Content-type', 'application/json'); | |
this._response.end(JSON.stringify(response)); | |
} catch(e) { | |
this.handleError(e); | |
} |
This file contains hidden or 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
__weak EAFriendsListContacts *weakSelf = self; | |
phoneVerification.dismissBlock = ^(BOOL success, NSString *phoneNumber, NSString *verificationCode){ | |
[button setEnabled:YES withSpinner:NO]; | |
if (success) { | |
[[EAEffectManager sharedEffectManager] startEffect:EAEffectTypeConfettiApplause]; | |
[weakSelf _refreshContactData]; | |
} | |
}; |
This file contains hidden or 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
- (void)addBlock:(genericBlock)blockName; | |
- (blockType)getBlock; |
This file contains hidden or 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 "DRBlocks.h" | |
@interface DRBlocks () | |
@property (nonatomic) NSMutableDictionary *blocksHash; | |
@end | |
@implementation DRBlocks | |
- (instancetype)init | |
{ |
This file contains hidden or 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
# Read SSH config | |
my $filename = '/Users/<your user>/.ssh/config'; | |
open(my $fh, '<:encoding(UTF-8)', $filename) | |
or die "Could not open file '$filename' $!"; |
This file contains hidden or 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
## EVILBASE %{TIMESTAMP_ISO8601:pickles} - %{LOGLEVEL:level}: | |
grok { | |
match => { "message" => "%{EVILBASE}%{GREEDYDATA}" } | |
} | |
date { | |
match => [ "pickles" , "ISO8601" ] | |
} |
This file contains hidden or 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
#include <Arduino.h> | |
#include "Relay.h" | |
// Relay is active low, so you need a 0 to turn it on. | |
#define RELAY_ON 0 | |
#define RELAY_OFF 1 | |
Relay::Relay( int whatPin ) | |
{ | |
// initialize variables |
This file contains hidden or 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
ArrayList<String> cardIds = new ArrayList<>(); | |
for (CardView.CardInfo c : cardsToDiscard) { | |
cardIds.add(c.getId()); | |
} | |
bindFragmentLifecycle(lifecycle(), | |
gameManager.discardCards(game.getGameId(), cardIds)).observeOn( | |
AndroidSchedulers.mainThread()).subscribe(new Action1<Long>() { | |
@Override public void call(JSON json, ERROR error) { | |
View view = getView(); | |
if (view == null) return; |
This file contains hidden or 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
{ | |
duck:true, | |
"french":"fries" | |
} |
This file contains hidden or 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
{ | |
"cluster_name" : "elasticsearch", | |
"nodes" : { | |
"QbEzXa1MRoOoupjNELMwlw" : { | |
"name" : "Zzzax", | |
"transport_address" : "inet[/10.0.0.240:9300]", | |
"host" : "ip-10-0-0-240", | |
"ip" : "10.0.0.240", | |
"version" : "1.4.0", | |
"build" : "bc94bd8", |