Skip to content

Instantly share code, notes, and snippets.

View KarbonDallas's full-sized avatar
🔥
Can't stop, won't stop

Karbon Dallas KarbonDallas

🔥
Can't stop, won't stop
  • Cascadia Bioregion
  • 22:22 (UTC -07:00)
View GitHub Profile

procedural mesh generation

Generates an algorithmic 3D OBJ file with ThreeJS and Node.js.

# print to stdout
node generate-mesh.js > test.obj

# write to file
node generate-mesh.js test.obj
@technobly
technobly / particle-ping.cpp
Created October 21, 2015 02:30
Particle Photon/Core/P1/Electron Ping PulseIn Example (HC-SR04)
/*
******************************************************************************
* Copyright (c) 2015 Particle Industries, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
@filmaj
filmaj / directions.md
Last active August 23, 2019 13:36
putting together an lxc for appium on ubuntu

ubuntu lxc

NOTES:

  • p1 referred to below is simply the name given to the LXC. You can change this if you want, just remember to always refer to the same container name :P
  • Only for real devices: make sure that the vendor ID you enter into the android udev rules file matches the device you want to be visible
  1. first, set up vagrant VM to run on a "public network". My Vagrantfile's only network config is:

config.vm.network "public_network", :bridge => 'en0: Wi-Fi (AirPort)'

@MylesBorins
MylesBorins / avahi-daemon.conf
Created November 28, 2012 05:32
Default avahi-daemon.com
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
@max-mapper
max-mapper / index.html
Created April 26, 2012 03:56
unobtrusive event binding
given some DOM:
<a href="#/">Foo<a>
<a href="#/bar">Bar<a>
<a href="#/baz!">Baz<a>
here is a relatively simple routing API:
var routes = {
'/': function() {
@mmalecki
mmalecki / gist:2070387
Created March 18, 2012 10:24
OH #nodejitsu
13:20 < Nexxy> mmalecki, I experienced OC spray today!
13:21 <+mmalecki> Nexxy: why would you even
13:21 < Nexxy> I wanted to make sure it worked
13:22 < Nexxy> it... it works.
13:22 <+mmalecki> what.
13:22 < Nexxy> I bought OC spray for my waifu and I and I read that you should test them to make sure they work
13:22 < Nexxy> so I did.
13:22 < Nexxy> and they do.
13:22 < Nexxy> really well.
13:23 < Nexxy> so well I had to take a nap after I was done choking
@gburd
gburd / haproxy.conf
Last active July 5, 2022 13:34
Recommended haproxy settings to balance Riak protobuf and http interfaces (note: WORK IN PROGRESS)
# Documentation for HAProxy
# http://code.google.com/p/haproxy-docs/w/list
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt
# NOTES:
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems)
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
// nexxy fix
if (card.author_id.toString() === s.user._id.toString()) {
return res.send
( { status: 'INVALID_REQUEST'
, error: 'Go high-five someone else!'
}
)
}
@logicplace
logicplace / gist:949556
Created April 30, 2011 09:40
gEdit Syntax Highlighting file for Embedded JavaScript (EJS), a JS templating engine. (Save as ejs.lang or something)
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Wa (logicplace.com)
MIT License
Copyright (C) 2011 by Wa (logicplace.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@fdmanana
fdmanana / gist:832610
Created February 17, 2011 20:27
The CouchDB replicator database

1. Introduction to the replicator database

A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".

Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.

The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.

2. Basics