Skip to content

Instantly share code, notes, and snippets.

@gre
gre / easing.js
Last active April 16, 2024 19:53
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@lonnen
lonnen / gist:3101795
Created July 12, 2012 23:24
git grep and git blame. two great tastes that taste great together
# from i8ramin - http://getintothis.com/blog/2012/04/02/git-grep-and-blame-bash-function/
# runs git grep on a pattern, and then uses git blame to who did it
ggb() {
git grep -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done
}
# small modification for git egrep bash
geb() {
git grep -E -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done
}
@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) {
(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))
@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.
@kujohn
kujohn / portforwarding.md
Last active January 21, 2022 02:36
Port forwarding in Mavericks

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@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
@boopathi
boopathi / README.md
Last active August 28, 2023 14:35
Creating a Swift-ReactNative project

Settings

  1. Create a project in XCode with the default settings
    • iOS > Application > Single View Application
    • Language: Swift
  2. Under project General settings, add ReactKit to Linked Framework and Libraries
    • + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
  3. Now ReactKit would have been imported. Link it by choosing it from the list.
    • + > lib.ReactKit.a
  4. Under project Build Settings,