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
var makerjs = require('makerjs') | |
// Model of pixel heart created by another script, hard-coded here for use in maker playground | |
var pixel_heart = {"paths":{"ShapeLine1":{"type":"line","origin":[0,9],"end":[1,9]},"ShapeLine2":{"type":"line","origin":[1,9],"end":[1,10]},"ShapeLine3":{"type":"line","origin":[1,10],"end":[2,10]},"ShapeLine4":{"type":"line","origin":[2,10],"end":[2,11]},"ShapeLine5":{"type":"line","origin":[2,11],"end":[5,11]},"ShapeLine6":{"type":"line","origin":[5,11],"end":[5,10]},"ShapeLine7":{"type":"line","origin":[5,10],"end":[8,10]},"ShapeLine8":{"type":"line","origin":[8,10],"end":[8,11]},"ShapeLine9":{"type":"line","origin":[8,11],"end":[11,11]},"ShapeLine10":{"type":"line","origin":[11,11],"end":[11,10]},"ShapeLine11":{"type":"line","origin":[11,10],"end":[12,10]},"ShapeLine12":{"type":"line","origin":[12,10],"end":[12,9]},"ShapeLine13":{"type":"line","origin":[12,9],"end":[13,9]},"ShapeLine14":{"type":"line","origin":[13,9],"end":[13,6]},"ShapeLine15":{"type":"line","origin":[13,6 |
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
var makerjs = require('makerjs') | |
// Model of pixel heart created by another script, hard-coded here for use in maker playground | |
var pixel_heart = {"paths":{"ShapeLine1":{"type":"line","origin":[0,9],"end":[1,9]},"ShapeLine2":{"type":"line","origin":[1,9],"end":[1,10]},"ShapeLine3":{"type":"line","origin":[1,10],"end":[2,10]},"ShapeLine4":{"type":"line","origin":[2,10],"end":[2,11]},"ShapeLine5":{"type":"line","origin":[2,11],"end":[5,11]},"ShapeLine6":{"type":"line","origin":[5,11],"end":[5,10]},"ShapeLine7":{"type":"line","origin":[5,10],"end":[8,10]},"ShapeLine8":{"type":"line","origin":[8,10],"end":[8,11]},"ShapeLine9":{"type":"line","origin":[8,11],"end":[11,11]},"ShapeLine10":{"type":"line","origin":[11,11],"end":[11,10]},"ShapeLine11":{"type":"line","origin":[11,10],"end":[12,10]},"ShapeLine12":{"type":"line","origin":[12,10],"end":[12,9]},"ShapeLine13":{"type":"line","origin":[12,9],"end":[13,9]},"ShapeLine14":{"type":"line","origin":[13,9],"end":[13,6]},"ShapeLine15":{"type":"line","origin":[13,6 |
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
/** | |
____ _ ____ ____ ____ | |
/ ___| / \ | _ \ | _ \ / ___| | |
| | / _ \ | |_) | | | | | \___ \ | |
| |___ / ___ \ | _ < | |_| | ___) | | |
\____| /_/ \_\ |_| \_\ |____/ |____/ | |
*/ | |
app.get('/cards', function (req, res) { | |
AdminAPI.getCards(req); |
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
{ | |
"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", |
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
{ | |
duck:true, | |
"french":"fries" | |
} |
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
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 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 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 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 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 | |
{ |
NewerOlder