Skip to content

Instantly share code, notes, and snippets.

// In a directory, run "npm install harfbuzzjs" to install harfbuzzjs
// then "node main.js" to run this example
var fs = require('fs');
var path = require('path');
function example(hb, fontBlob, text) {
var blob = hb.createBlob(fontBlob);
var face = hb.createFace(blob, 0);
// console.log(face.getAxisInfos());

Has field live template, suggested name: hf

public boolean has$SET_NAME$() {
  return hasFieldSet("$SET_NAME$");
}

PresenceTrackingSetter Template,

#set($paramName = $helper.getParamName($field, $project))
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct node {
int key;
int val;
struct node *next;
@SimplyAhmazing
SimplyAhmazing / electron-notes.md
Created January 31, 2018 19:28
Electron Notes

Sign an electron dev executable,

$ codesign --deep --force --verbose --sign - node_modules/electron/dist/Electron.app

Made some updates to this PR due after following up on the error Akash got in running the tests locally. In turn this past week I have to come to learn a lot about Visual Regression Testing that I want to share here and discuss with you all. The things I want to share are organized in these topics,

  • Non deterministic rendering of images
  • Electron/Chrome non deterministic states
  • Visual regression work flows
  • Tools & Literature

On Non deterministic rendering

@SimplyAhmazing
SimplyAhmazing / submodules-for-ci.md
Last active July 26, 2017 15:17
Git submodules on CI Notes

Add to Travis

before_install:
    - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
    - git submodule update --init --recursive

or apply sed call to repo:

@SimplyAhmazing
SimplyAhmazing / call_depth.py
Last active July 24, 2017 18:33
Track call depth of a method relative to other methods in a class
import inspect
def call_depth(instance):
methods_to_consider = [
func_name
for func_name, _ in inspect.getmembers(
instance, predicate=inspect.ismethod)
]
stack_funcs = [i.function for i in inspect.stack()]
@SimplyAhmazing
SimplyAhmazing / command-queue-less-api-example.py
Last active August 2, 2017 20:04
Shows an example of using the Opentrons API in Jupyter
# To use this API:
#
# Uninstall previously installed API
# pip uninstall -y opentrons
#
# Install API from here
# pip install "git+https://github.com/opentrons/opentrons@release-2.5.0#egg=opentrons&subdirectory=api"
# imports
from opentrons import robot, containers, instruments
@SimplyAhmazing
SimplyAhmazing / ot_proto.py
Created May 9, 2017 16:47
Protocol Workout
num_samples = 8
DNA_delay = 6
heat_shock_delay = 6
cold_delay = 6
DNA_vol = 2
cell_vol = 25
total_vol = 27
LB_vol = 200
@SimplyAhmazing
SimplyAhmazing / smart_modules_api.md
Last active April 27, 2017 18:38
Smart Modules API

Smart Modules API (sample)

Instruments (attached to the robot)

Pipette

pump = instruments.Pipette(axis='a', ...)
pump.dispense(volume, <location>)