Skip to content

Instantly share code, notes, and snippets.

View verma's full-sized avatar
💭
Working from home because the virus is out to get us!

Uday Verma verma

💭
Working from home because the virus is out to get us!
View GitHub Profile
// index.js
// Facebook login test!
//
var server = require("ferb")(),
session = require("express-session")({secret: '1234'}),
request = require("request");
var FACEBOOK_APP_SECRET = "APP_SECRET",
FACEBOOK_APP_ID = "APP_ID";
extractStream(req, function(err, dirname) {
if (err)
return res.json(500, {status: false, message: err.message});
cp.exec("npm install", {
cwd: dirname
}, function(err, stdout, stderr) {
if (err)
return res.json({status: false, message: err.message});
@verma
verma / postwalk.clj
Last active September 6, 2019 06:10
pre-walk vs. post-walk
:profile_data
:ber
:value
11
[:value 11]
{:value 11}
[:ber 11]
:event_type
:value
foo
@verma
verma / .vimrc
Last active April 19, 2016 15:56
Most recent .vimrc
" Enable syntax highlighting
" and apply our nice color theme
"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
user=> (require 'weasel.repl.websocket)
nil
user=> (cemerick.piggieback/cljs-repl
#_=> :repl-env (weasel.repl.websocket/repl-env
#_=> :ip "0.0.0.0" :port 9001))
WARNING: Symbol event/EventType is not a protocol at line 25 file:/Users/verma/.m2/repository/weasel/weasel/0.3.0/weasel-0.3.0.jar!/weasel/impls/websocket.cljs
WARNING: Symbol event/EventType is not a protocol at line 25 out/weasel/impls/websocket.cljs
UnsupportedOperationException count not supported on this type: Symbol clojure.lang.RT.countFrom (RT.java:556)
user=>
Compiling "target/dev/renderer.js" failed.
clojure.lang.ExceptionInfo: failed compiling file:src/renderer/core.cljs
core.clj:4403 clojure.core/ex-info
compiler.clj:1029 cljs.compiler/compile-file
compiler.clj:1082 cljs.compiler/compile-root
closure.clj:341 cljs.closure/compile-dir
closure.clj:381 cljs.closure/eval2986[fn]
closure.clj:292 cljs.closure/eval2923[fn]
closure.clj:395 cljs.closure/eval2973[fn]
closure.clj:292 cljs.closure/eval2923[fn]
GreyhoundReader.prototype.readIndexed = function(sessionId, bbox, schema, depthBegin, depthEnd, cb) {
var options = {
schema: (schema || Schema.standard()),
};
if (typeof(bbox) === 'function') {
cb = bbox;
bbox = schema = depthBegin = depthEnd = null;
}
" Enable syntax highlighting
" and apply our nice color theme
"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
(ns node-tests.core
(:require [cljs.nodejs :as nodejs]
[cljs.core.async :as async :refer [<!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(nodejs/enable-util-print!)
(defn clojureify [f]
(fn [] (js/console.log f)))
(ns node-tests.core
(:refer-clojure :exclude [exists?])
(:require [cljs.nodejs :as nodejs]
[cljs.core.async :as async :refer [<!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(nodejs/enable-util-print!)
;; Some helpers which help transform node style functions into clojurey ones
;;