Skip to content

Instantly share code, notes, and snippets.

@stevenleeg
stevenleeg / pie.coffee
Last active March 11, 2023 09:23
A simple d3 pie chart widget for Dashing.
class Dashing.Pie extends Dashing.Widget
@accessor 'value'
onData: (data) ->
@render(data.value)
render: (data) ->
if(!data)
data = @get("value")
if(!data)
@stevenleeg
stevenleeg / natural_time.go
Last active December 29, 2015 06:58
This is pretty much a direct port of Josh Segall's natural time function (http://stackoverflow.com/a/5164027) to Golang.
package utils
import (
"time"
"fmt"
)
func TimeRelativeToNow(in time.Time) string {
diff := time.Since(in)
Error: Cannot find module 'websocket'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/srv/http/grooveboat/buoy/groovebuoy.js:1:85)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

Keybase proof

I hereby claim:

  • I am stevenleeg on github.
  • I am stevenleeg (https://keybase.io/stevenleeg) on keybase.
  • I have a public key whose fingerprint is 9016 4BFA 469B 88C7 C101 31A8 63AA 05F3 A2A7 D081

To claim this, I am signing this object:

let itsATextInput: UITextInput = {
let input = UITextInput()
input.customProperty = "lol"
input.wat = .HelloWorld
// etc...
return input
}()
Hi [represenative name],
As one of your supporting constituents of [town name in district] who is a
worker in the tech community I am very much so hoping that you vote against
Assembly Bill A8093. As a software engineer I can assure you that any effort to
undermine the encryption on devices will have unintended consequences that will
negatively affect our ability to maintain personal privacy and security against
malicious actors (inside and outside of the government/law enforcement).
The proposed bill would require manufacturers to create a backdoor in a
/srv/http/localhost/rochack
From https://github.com/rochack/rochack.org
54edf6a..6031486 master -> origin/master
HEAD is now at 6031486 Removing stale image
/usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'jekyll' (>= 0) among 11 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/srv/http/.gem/ruby/2.3.0:/usr/lib/ruby/gems/2.3.0', execute `gem env` for more information
from /usr/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/bin/jekyll:22:in `<main>'
import Immutable from 'immutable';
import {put, take} from 'redux-saga/effects';
import {ClientActions, ClientActionTypes} from 'services/clients/transitions';
import {generateFormTransitions} from 'utils/form-transitions';
import translateTransitions from 'utils/translate-transitions';
const initialValues = Immutable.fromJS({
name: '',
});
import {generateRestfulTransitions} from 'utils/restful-transitions';
import translateTransitions from 'utils/translate-transitions';
const {
transitions: restfulTransitions,
initialState: restfulInitialState,
} = generateRestfulTransitions({
singularNoun: 'client',
pluralNoun: 'clients',
});
@stevenleeg
stevenleeg / auth.rb
Last active February 17, 2019 18:29
Standard Notes authentication in ruby
resp = HTTP.use(:auto_inflate).get("#{BASE_URL}/auth/params?email=#{EMAIL}")
auth_params = JSON.parse(resp.body.to_s)
salt = Digest::SHA256.hexdigest([
EMAIL,
"SF",
auth_params["version"],
auth_params["pw_cost"],
auth_params["pw_nonce"],
].join(":"))