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
require 'date' | |
require 'net/http' | |
require 'uri' | |
require 'open-uri' | |
require 'rubypress' | |
require 'mime' | |
require 'mime/types' | |
require 'imgkit' | |
# goals |
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
A small bit of kvetching... | |
Imagine in Shakespeare if a sonnet didn't hew towards the core message but instead had you hold all the loose blocks of marble in working memory. | |
My mistresses eyes are like the sun in no way, but in the way they are not like the sun so is her hair like wires, and in the way they are like the sun there is nothing further to remark upon. | |
By a similar quality it bugs me when early out conditions are deferred to the end of a code block. For me this is probaby a carry over from working in assembler. In early programming environments there was both a computational and cognitive cost to jumping around a block of other code prior to ceding control. Modern compilers optimize this away but there's still a cognitive burden to having to hold a larger model in mind. If you think of a piece of code as a tree of branching possibilities then it makes sense to whittle away those branches as quickly as possible so that you're left with the minimum functionality needed to close out the responsib |
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
// | |
// a snippet for for iOS scenekit | |
// generate an open half cylinder in such a way that the texture stretches from 0->1 over the surface | |
// the idea is that this could be used for a 180' pano | |
// | |
- (SCNGeometry*) createCurve:(int)resolution width:(float)radius { | |
if(resolution<1)return nil; |
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
const http = require('http'); | |
function pushme(mydata,mytable) { | |
var postData = JSON.stringify( mydata ); | |
var options = { | |
hostname: 'localhost', | |
port: 1337, | |
path: '/parse/classes/'+mytable, |
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
<!-- see the writeup at https://medium.com/@anselm/playing-with-gps-spatialized-web-audio-f86e45d31d10 --> | |
<canvas id="mycanvas" width=512 height=512> | |
</canvas> | |
<script> | |
// a small database of all the objects | |
let artifacts = [ |
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
- categories | |
- support | |
- hardware | |
- 3d trackers | |
- rendering | |
- animation | |
- datastore | |
- cloud service | |
- account management |
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
### Keybase proof | |
I hereby claim: | |
* I am anselm on github. | |
* I am anselmhook (https://keybase.io/anselmhook) on keybase. | |
* I have a public key whose fingerprint is 47D8 81E1 7770 619D F180 C796 238F A172 01DE BFE1 | |
To claim this, I am signing this object: |
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
This is a quick outline of building an web service with these constraints: | |
- some kind of cloud hosting; ie; visibile anywhere on the internet, no fretting over back end unix installs | |
- presents a user editable fillable form on a web page | |
- saves that user supplied form data to persistent state on the server | |
- signs the user supplied information with a private key | |
- does some secure server side transactionally bound database actions | |
- returns a result to the user | |
I've been using firebase lately and I'd definitely do it this way if I was asked to do a quick one off. |
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
// See the Figma https://www.figma.com/file/pzq5EhzdxXvhpBoFlB8MDd/Money-Savings-App?node-id=5%3A3 | |
// And see the app https://glitch.com/edit/#!/web3-time-lock | |
pragma solidity >=0.4.22 <0.7.0; | |
contract FutureBank { | |
address private owner; | |
mapping (address => uint256) private balances; | |
mapping (address => uint256) private locktime; |
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
// the below is a rust port of https://gist.github.com/bellbind/6954679 | |
// capture image from webcam(e.g. face time) | |
// some helpful examples | |
// https://kyle.space/posts/cocoa-apps-in-rust-eventually/ | |
// msg_send | |
// https://github.com/SSheldon/rust-objc/blob/master/examples/example.rs |