Skip to content

Instantly share code, notes, and snippets.

@tedhorst
tedhorst / smlm.rs
Created September 27, 2013 20:33
rust parallel mandelbrot
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
@varjmes
varjmes / james_salsa.txt
Created July 10, 2017 20:04
James' Salsa
Tin of peeled plum tomatoes (incl. the juice!)
Fist of fresh coriander (cilantro for my US buds)
Half a brown onion
Half a garlic bulb
Half to 2/3 of a Jalapeño
2 Tablespoons of Olive Oil (don't get fancy with it)
Two shakes of black pepper (any shit will do)
Pinch of salt (any shit will do)
Chop the shit out of everything choppable
(ns create-draw.opencv
(:import
org.opencv.core.Core
org.opencv.core.Mat
org.opencv.core.MatOfRect
org.opencv.core.Point
org.opencv.core.Rect
org.opencv.core.Scalar
org.opencv.highgui.Highgui
org.opencv.objdetect.CascadeClassifier))
@mohamedkhanafer
mohamedkhanafer / .block
Created February 7, 2020 22:58
Final visualization
license: mit
@chenglou
chenglou / gist:34b155691a6f58091953
Last active April 5, 2021 19:15
Better feature for React key

key is pretty much crucial for state perservation in React. As of React 0.13 it can't do the following things:

  • Clone state
<Comp key={1} /><Comp key={1} />
  • Preserve component state across different parents:
@lpalmes
lpalmes / react.md
Last active May 7, 2021 17:59
React and Reconcilers in Reason

React

This is the base of all projects and it will include the foundation for all potential react-based projects in Reason.

This base package should include a ReasonReact api to promote collaboration and familiarity with people using a ReasonReact, and for the modern world of React this should also include a Hooks api that currently revery uses.

React module

All blocks in Jsx are of type React.reactElement. This reactElement should represent:

@michaelsbradleyjr
michaelsbradleyjr / cljs-debug-macros.clj
Last active November 5, 2021 21:36
Macros and functions which facilitate the development and debugging of other macros and their supporting functions within a ClojureScript project.
(ns my-cljs.macros.debug
(:require [cljs.analyzer :as cljs]
clojure.walk))
(declare ap
cljs-macroexpand*
cljs-macroexpand-1*
cljs-macroexpand-all*
cljs-macroexpand
.
├── actions
├── stores
├── views
│   ├── Anonymous
│   │   ├── __tests__
│   │   ├── views
│   │   │   ├── Home
│   │   │   │   ├── __tests__
│   │   │   │   └── Handler.js
@fdietz
fdietz / app.js
Created February 19, 2013 19:20
Recipes with Angular.js: Controllers - Sharing Models Between Nested Controllers
var app = angular.module("MyApp", []);
app.controller("MyCtrl", function($scope) {
$scope.name = "Peter";
$scope.user = {
name: "Parker"
};
});
app.controller("MyNestedCtrl", function($scope) {