Skip to content

Instantly share code, notes, and snippets.

https://www.referyourchasecard.com/2/LZN2037M5A
"cmdline": ["/opt/rackness/go-rackness", "-logtostderr=true"],
"memstats": {
"Alloc": 2502768,
"TotalAlloc": 390476296,
"Sys": 71500024,
"Lookups": 0,
"Mallocs": 4475397,
"Frees": 4452172,
"HeapAlloc": 2502768,
"HeapSys": 66682880,
#include <Adafruit_NeoPixel.h>
#include "Arduino.h"
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 11
//======================================
var Delta = Quill.import('delta');
var quill = new Quill('#editor-container', {
modules: {
toolbar: true
},
placeholder: 'Compose an epic...',
theme: 'snow'
});
// Store accumulated changes
diego@diego-Precision-5520:~/work/golang/src/github.com/ascendantcompliance/acm-go/cmd/blotterizer/markit$ go test -benchmem -bench BenchmarkMarkitExport --mongourl=127.0.0.1:27017 -memprofile=mem9.out
goos: linux
goarch: amd64
pkg: github.com/ascendantcompliance/acm-go/cmd/blotterizer/markit
BenchmarkMarkitExport-8 300 3908632 ns/op 13436490 B/op 16003 allocs/op
PASS
ok github.com/ascendantcompliance/acm-go/cmd/blotterizer/markit 1.659s
diego@diego-Precision-5520:~/work/golang/src/github.com/ascendantcompliance/acm-go/cmd/blotterizer/markit$ go tool pprof --alloc_space mem9.out
File: markit.test
Type: alloc_space
@fmpwizard
fmpwizard / acm.pgp
Last active October 11, 2019 14:55
April 2020 expiration
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFjVIlgBEADCGDcyxmt5QpdH+YRhvxYll/03LFLwFs8fQKpSSEQyZT49zpFj
jnzNzfGpxAn8cm0X5g36eCI4lsKdWuxerhyyQKvTxpXWngZLGzqbWhcgi+wPY0OF
2M90SVPQsz5K/Ekl1UufnIIwcG5XHN9u/UNuNxE1/vhCibjw1yUu1ul5CPyZLFAu
ZRsGyedYzpIhY1GdjnQA0U9ISr9xgWCIR9QP+214HhfEApapqU5dRh5DRqAGV9im
wof86lG1kGubSNufnonSLRQXgPAYXrVgD34Csb3O6YceG4VPgea07ZUwL7zfEYvm
khOwq0ULjp0mLzooZ4SWoITP456e657RLcUPEfSUwYVtOrIYtMTScTqqq7UCWnIG
mr2DJmgr3HnoeqpnXrOfLiH2p8B3m3PnlqBi0eIDbPREC5w0vk2hjsAoeclQH32H
yEj/YM1kHsytbD6lgGpJIt7kjkFCz6EExNpjWS4kw1gKnMNQKn69E+8z8urKmrGl
class ObjectIdStringSerializer extends Serializer[ObjectId] {
private val ObjectIdClass = classOf[ObjectId]
def deserialize(implicit format: Formats): PartialFunction[(TypeInfo, JValue), ObjectId] = {
case (TypeInfo(ObjectIdClass, _), json) => json match {
case JString(s) if (ObjectId.isValid(s)) =>
new ObjectId(s)
case x => throw new MappingException("Can't convert " + x + " to ObjectId")
}
}
package code.servlets
import java.util.UUID
import javax.servlet._
import javax.servlet.http.{HttpServletRequest, HttpServletResponse}
import code.config.AppSettings
import code.model.AcmApp
import code.model.user.ExtSession._
import net.liftmodules.mongoauth.MongoAuth
@fmpwizard
fmpwizard / light-node.ino
Last active February 23, 2016 00:19
LED Strip lights for the garage door
// Sample RFM69 receiver/gateway sketch, with ACK and optional encryption, and Automatic Transmission Control
// Passes through any wireless received messages to the serial port & responds to ACKs
// It also looks for an onboard FLASH chip, if present
// RFM69 library and sample code by Felix Rusu - http://LowPowerLab.com/contact
// Copyright Felix Rusu (2015)
#include <RFM69.h> //get it here: https://www.github.com/lowpowerlab/rfm69
#include <RFM69_ATC.h>//get it here: https://www.github.com/lowpowerlab/rfm69
#include <SPI.h> //comes with Arduino IDE (www.arduino.cc)
@fmpwizard
fmpwizard / house-led-strip.ino
Last active January 27, 2016 07:20
Control 150 LED lights, listen for code to go to next pattern
#include <Adafruit_NeoPixel.h>
#include "Arduino.h"
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
//On off with ultrasonic distance sensor