Skip to content

Instantly share code, notes, and snippets.

View xtang's full-sized avatar

xiaomin tang xtang

View GitHub Profile
@nfd9001
nfd9001 / debossed-text-flatbox-rev5-top.scad
Created August 4, 2023 23:29
Script to deboss text onto a flatbox rev5 case top
/*tested on flat bed, 0.2mm layer height. YMMV on textured.
be careful on bold/black fonts;
your printer may or may not like large overhangs even ~3 layers up.
bring the default flatbox top STL with you into the directory where this file is saved*/
xshift = 10;
yshift = -55;
rotation = 0; //degrees
deboss_string = "sample text";
font_name = "DejaVu Sans";
@sunng87
sunng87 / leancustomerdevelopment.org
Created May 23, 2022 09:58
Notes on Lean Customer Development
@willwhui
willwhui / Connect to Google Home
Created June 1, 2017 13:57
Connect to Google Home
Connect to Google Home
(require '[clojure.core.async :as a])
(def xform (comp (map inc)
(filter even?)
(dedupe)
(flatmap range)
(partition-all 3)
(partition-by #(< (apply + %) 7))
(flatmap flatten)
(random-sample 1.0)
@codeinthehole
codeinthehole / docker-osx-shared-folders.rst
Last active November 11, 2023 01:22
How to share folders with docker containers on OSX

How to share a folder with a docker container on OSX

Mounting shared folders between OSX and the docker container is tricky due to the intermediate boot2docker VM. You can't use the usual docker -v option as the docker server knows nothing about the OSX filesystem - it can only mount folders from the boot2docker filesystem. Fortunately, you can work around this using SSHFS.

Virtual DOM and diffing algorithm

There was a [great article][1] about how react implements it's virtual DOM. There are some really interesting ideas in there but they are deeply buried in the implementation of the React framework.

However, it's possible to implement just the virtual DOM and diff algorithm on it's own as a set of independent modules.

@desandro
desandro / require-js-discussion.md
Created January 31, 2013 20:26
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


@ToddG
ToddG / rebar-reltool-relase-notes.md
Created September 15, 2012 16:46
using rebar to create an erlang app with a dependency, and then starting a release created with reltool

Summary

I'm trying to figure out how to use rebar to:

  • create erlang project
  • add a dependency on an erlang module from github
  • start the app via the erl console
  • create a release and start the app from the release (via the generated scripts)
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);