Skip to content

Instantly share code, notes, and snippets.

Don Park donpdonp

Block or report user

Report or block donpdonp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@donpdonp
donpdonp / tls.js
Last active Nov 11, 2019
gluon tls ssl checks
View tls.js
(function() {
// descriptor
return {name:"tls"}
})
// osm json
//{"bearing":345.9410965462545,"distance":355.0966239302687,
// "node":{"id":1963188104,"lat":45.5233261,"lon":-122.6584695,"tags":{...
function go(msg) {
@donpdonp
donpdonp / kluster.js
Last active Sep 17, 2019
gluon kmeans cluster test
View kluster.js
(function() {
return {
name: "kluster"
}
})
var proxpairs = {}
function go(msg) {
if(msg.method == "irc.privmsg") {
View gist:d770da8dde3aaba0e6a25f5d35c78856
diff --git a/src/main.zig b/src/main.zig
index d651eb9..93bb0ea 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -230,7 +230,7 @@ fn netback(command: *thread.Command) void {
for(tree.root.Array.toSlice()) |jsonValue| {
const item = jsonValue.Object;
var toot = allocator.create(toot_lib.Type) catch unreachable;
- toot.init(item, allocator);
+ toot = toot_lib.Type.init(item, allocator);
View gist:b6d51d70c4b59c3780d760f8b0938685
/* gdk/gdkevents.h */
struct _GdkEventTouch
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
gdouble x;
gdouble y;
gdouble *axes;
View gist:c615aa58ff8f408410daf4477de80b1f
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-hello-world */
#include "common.h"
BEGIN
DBG
mov $msg, %si
mov $0x0e, %ah
loop:
lodsb
or %al, %al
@donpdonp
donpdonp / 911.js
Last active Jul 26, 2019
gluon 911
View 911.js
(function() {
return {name:"911"}
})
var reports
var reportdate
function go(msg) {
if (msg.method == "irc.privmsg") {
var settled_match = /^!911$/.exec(msg.params.message)
View russelltemp.js
(function() {
return {name: "russelltemp"}
})
function go(msg){
if (msg.method == "irc.privmsg") {
var epoch_match = /^!russelltemp(\s+(\S+))$/.exec(msg.params.message)
if(epoch_match) {
var sensor_id = epoch_match[2]
var rows = russelltemp(sensor_id)
@donpdonp
donpdonp / osm.js
Last active Oct 30, 2019
gluon osm openstreetmap lookups
View osm.js
(function() {
// descriptor
return {name:"osm"}
})
// osm json
//{"bearing":345.9410965462545,"distance":355.0966239302687,
// "node":{"id":1963188104,"lat":45.5233261,"lon":-122.6584695,"tags":{...
function go(msg) {
@donpdonp
donpdonp / shift2bikes.js
Last active Jun 4, 2019
gluon shift2bikes pedalpalooza calendar
View shift2bikes.js
(function() {
return {name:"shift2bikes"}
})
function go(msg) {
if (msg.method == "irc.privmsg") {
var cmd = /^!shift2bikes(\s+(.*))?/.exec(msg.params.message)
if(cmd) {
var now = new Date()
var rides = shiftGet(now)
View gist:29c577985063acb48e69df74e433973f
donp@jewel zig $ git diff
diff --git a/build.zig b/build.zig
index dd8c6fe..3411e9d 100644
--- a/build.zig
+++ b/build.zig
@@ -1,3 +1,4 @@
+const builtin = @import("builtin");
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
You can’t perform that action at this time.