This is the script we use at yerdle to print labels from our Rails backend to our Zebra ZP450 printer.
See this blog post for the whole story.
#!/bin/bash | |
### Basic build environment ####### | |
apt update | |
apt install -y make gcc ack libpcsclite-dev pkg-config unzip debhelper | |
apt upgrade -y | |
cd /root | |
## Install golang |
This is the script we use at yerdle to print labels from our Rails backend to our Zebra ZP450 printer.
See this blog post for the whole story.
import random | |
def badsort(l): | |
done = False | |
loops = 0 | |
while not done: | |
loops += 1 | |
random.shuffle(l) | |
done = True | |
for i in range(len(l)-1): |
checkout: | |
post: | |
- git submodule sync | |
- git submodule update --init # use submodules | |
deployment: | |
production: | |
branch: production | |
commands: | |
- ./bin/heroku_deploy.sh yerdle: | |
timeout: 300 |
Background: I'm working on a project that uses Web Audio API and synthesized sound. This is my first time using Web Audio API and I've struggled to find good sounds. Wishing the current libraries were more accessible to, for example, a game developer who would like to be able to select from a palette of interesting sounds.
With the benefit of an outsider's eye on web audio, I see four issues with synth libs right now:
# General event handler for showing, hiding, and toggling elements. | |
# | |
# Usage: <a href="x" data-show="#my_form"> | |
# If #my_form exists, we'll call show() on it. | |
# Otherwise, we'll follow the link to x. |
> F = function() {} | |
function () {} | |
> F.prototype = new String("hello") | |
"hello" | |
> f = new F() | |
function () {} | |
> f.length | |
0 | |
(why isn't this 5?) |
KeenIO = require 'keen-js' | |
Q = require 'q' | |
class KeenClient | |
constructor: -> | |
@client = new KeenIO( | |
projectId: process.env.KEEN_PROJECT_ID | |
readKey: process.env.KEEN_READ_KEY | |
) | |
@started = false |
# KeenIO stuff | |
# | |
CsvStringify = require 'csv-stringify' | |
Keen = require './keen_client.js.coffee' | |
Q = require 'q' | |
_ = require 'underscore' | |
moment = require 'moment-timezone' | |
class Retention | |
constructor: (@keenClient, @steps, @period = 'weeks') -> |
# lib/redis_cacheable.rb | |
module RedisCacheable | |
def self.included(base) | |
base.send(:include, Redis::Objects) | |
base.extend ClassMethods | |
end | |
module ClassMethods |