Skip to content

Instantly share code, notes, and snippets.

Uday Verma verma

Block or report user

Report or block verma

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9717096
PointCollector.prototype._2dProj = function(p, proj) {
proj = proj || (new THREE.Projector());
var ndc = p.clone();
proj.projectVector(ndc, this.fromCamera);
return new THREE.Vector3(
ndc.x * this.size[0] / 2, ndc.y * this.size[1] / 2, 1.0);
};
View map-vals.clj
(defn map-vals
"Maps the values of the map col using f"
[f col]
(into {} (map (fn [[a b]] [a (f b)]) col)))
View gist:9980396
(defn join-path
"Join path elements together, if any of the path components start with a /
the function assumes that the path is being reset to root and will ignore all parts
before that"
[p & parts]
(let [p (if (empty? p) "." p)]
(.getPath (reduce #(if (.startsWith %2 "/")
(io/file %2)
(io/file %1 %2)) (io/file p) parts))))
@verma
verma / 0_reuse_code.js
Created Apr 5, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View email.js
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
var EmailWidget = React.createClass({
getInitialState: function() {
return {
buttonEnabled: false
};
},
View gist:11013981
(dom/div #js {:className "col-sm-2 tag-button-container"}
(dom/button #js {:className "btn btn-default btn-lg tag-item-action"
:type "button"
:dataToggle "modal"
:dataTarget "#tagsModal"} "Tag"))
View gist:11016107
om/IWillMount
(will-mount [_]
(go (loop []
(let [file (<! modal-chan)]
(log "The user wants to tag " file)
(log "Tags are", tags)
(log "owner is", owner)
(log "state is", (om/get-state owner))
(om/set-state! owner :target file)
(.modal ($ (om/get-node owner)) "show"))
View keybase.md

Keybase proof

I hereby claim:

  • I am verma on github.
  • I am verma (https://keybase.io/verma) on keybase.
  • I have a public key whose fingerprint is 0527 6336 3D96 49AB F346 8C67 DB8F 7A5B 09C2 A80C

To claim this, I am signing this object:

View laz-perf.cpp
#include <emscripten/bind.h>
using namespace emscripten;
class LASZip {
public:
LASZip() {}
void open(const char *buf, size_t len) {
printf("Got buffer: %p, size: %i", buf, len);
}
View canvas.html
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
You can’t perform that action at this time.