Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am davidwilemski on github.
  • I am davidw (https://keybase.io/davidw) on keybase.
  • I have a public key ASCvcFHDui4AtpFNl7QJEleVec5domXKmT3d24vN11NQwAo

To claim this, I am signing this object:

@davidwilemski
davidwilemski / gist:8e77eb25bb1164edd4a40437b09b35bb
Created October 20, 2017 20:26
enable archive in mailspring for Fastmail
JSON.stringify(require('mailspring-exports').CategoryStore._categoryCache);
var ChangeRoleMappingTask = require('mailspring-exports').ChangeRoleMappingTask;
var Actions = require('mailspring-exports').Actions;
// Fastmail uses the "Archive" folder for archiving mail
var task = new ChangeRoleMappingTask({role: "archive", path: "Archive", accountId: "<youraccountid>"});
Actions.queueTask(task);

Keybase proof

I hereby claim:

  • I am davidwilemski on github.
  • I am davidw (https://keybase.io/davidw) on keybase.
  • I have a public key ASDStoX1YXxUwy1qWceZfZOm0JtheMdpDd7mm2R23QtH0go

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am davidwilemski on github.
  • I am davidw (https://keybase.io/davidw) on keybase.
  • I have a public key whose fingerprint is 9847 9F3A A0E5 4471 BD24 731F 5B63 9A28 8137 AD16

To claim this, I am signing this object:

diff --git a/resources/js/data.js b/resources/js/data.js
index aabc133..5a2a689 100644
--- a/resources/js/data.js
+++ b/resources/js/data.js
@@ -131,6 +131,7 @@ function getQueryVariable(variable)
var divs = $();
var tab = [];
+if (window.location.href.search("/spot.html") == -1) {
$.ajax({
@davidwilemski
davidwilemski / gist:e7f82275deeaca6dfe6c
Created April 30, 2014 17:37
hoppers hop validation logic
dist_row = 0
dist_col = 2
middle_row = row
if (dist_row == 2 && destination.Row > prevous.Row) {
middle_row = row + dist_row - 1
} else if (dist_row == 2 && destination.Row < prevous.Row) {
middle_row = row - dist_row - 1
}
@davidwilemski
davidwilemski / triples.py
Created April 22, 2014 01:16
Pythagorean Triples
triples = ((x, y, z) for z in xrange(1, 10000) for x in range(1, z) for y in range(x, z) if x*x + y*y == z*z)
print triples.next()
print triples.next()
/**
* @jsx React.DOM
*/
var CommentBox = React.createClass({
getInitialState: function() {
return {data: []};
},
componentDidMount: function() {
var nums = this.state.data;
var ws = new WebSocket("ws://" + window.location.host + "/derp");
web: python web.py
api: python api.py
@davidwilemski
davidwilemski / app.py
Created February 20, 2014 05:37
teado list REST API - messing with flask-restful
from flask import Flask
#from flask.ext import restful
import flask_restful as restful
from flask_restful import reqparse, fields, marshal_with
import mongoengine
app = Flask(__name__)
api = restful.Api(app)
teado_fields = {