Skip to content

Instantly share code, notes, and snippets.

View objectiveSee's full-sized avatar

Danny Ricciotti objectiveSee

  • Starship Studios
View GitHub Profile
@objectiveSee
objectiveSee / notcher.js
Created April 18, 2017 20:47
Parameters:
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
@objectiveSee
objectiveSee / notcher.js
Created April 18, 2017 20:47
Parameters:
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
/**
____ _ ____ ____ ____
/ ___| / \ | _ \ | _ \ / ___|
| | / _ \ | |_) | | | | | \___ \
| |___ / ___ \ | _ < | |_| | ___) |
\____| /_/ \_\ |_| \_\ |____/ |____/
*/
app.get('/cards', function (req, res) {
AdminAPI.getCards(req);
@objectiveSee
objectiveSee / curl.json
Created December 22, 2015 17:51
curl http://localhost:9200/_nodes/jvm?pretty.json
{
"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",
{
duck:true,
"french":"fries"
}
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;
#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
## EVILBASE %{TIMESTAMP_ISO8601:pickles} - %{LOGLEVEL:level}:
grok {
match => { "message" => "%{EVILBASE}%{GREEDYDATA}" }
}
date {
match => [ "pickles" , "ISO8601" ]
}
@objectiveSee
objectiveSee / ssh.pl
Last active August 29, 2015 14:14
usage: ./ssh.pl or ./ssh.pl <index of host>
#!/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' $!";
#import "DRBlocks.h"
@interface DRBlocks ()
@property (nonatomic) NSMutableDictionary *blocksHash;
@end
@implementation DRBlocks
- (instancetype)init
{