This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns yourapp.core | |
(:require [figwheel.client :as fw] | |
[sablono.core :as html :refer-macros [html]] | |
[om.core :as om :include-macros true] | |
[om-tools.core :refer-macros [defcomponent]] | |
)) | |
(enable-console-print!) | |
(defonce world (atom {:text "Hello!"})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(comment | |
;; Bug report for CLJS-721 (support :include-macros true modifier in :require), | |
;; Ref. http://dev.clojure.org/jira/browse/CLJS-721, | |
;; http://goo.gl/MQ3fWd (GitHub commit de6ee41b3) | |
;; desugar-ns-specs from clojurescript/src/clj/cljs/analyzer.clj | |
;; (`cljs.analyzer` ns) | |
(desugar-ns-specs '[(:require [foo.bar :as bar :include-macros true])]) | |
;; => |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(typeof Math.imul == "undefined" || (Math.imul(0xffffffff,5) == 0)) { | |
Math.imul = function (a, b) { | |
var ah = (a >>> 16) & 0xffff; | |
var al = a & 0xffff; | |
var bh = (b >>> 16) & 0xffff; | |
var bl = b & 0xffff; | |
// the shift by 0 fixes the sign on the high part | |
// the final |0 converts the unsigned value into a signed value | |
return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Chance.js 0.7.2 | |
// http://chancejs.com | |
// (c) 2013 Victor Quinn | |
// Chance may be freely distributed or modified under the MIT license. | |
/** @interface */ | |
function Chance(seed) {} | |
/** @type {!Chance} */ | |
var chance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"================================================================================== | |
" VUNDLE (auto-install plugins): | |
" > git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle | |
" > vim +BundleInstall | |
"================================================================================== | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [old-arr #js [] | |
new-arr #js []] | |
(doseq [val old-arr] | |
(when (should-include? val) | |
(.push new-arr val)))) |
In response to a StackOverflow question:
This is code to build a Direct3D wrapper DLL, intercepting all calls to Direct3D interface functions so that you can draw your own objects to display over the game. Just plop the DLL into the same folder as the game's executable, and it should load it as if it were the real d3d9.dll file. It still forwards all calls to the real one in system32, just allows stuff to happen in between. original stackoverflow answer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var atlas = (function(){ | |
var canvas,ctx; | |
var size = 22; | |
var cols = 14; // has to be ONE MORE than intended to fix some sort of CHROME BUG (last cell always blank?) | |
var rows = 22; | |
var creates = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; dummy protocol | |
(defprotocol IFoo | |
(foo [this])) | |
;; dummy cljs type | |
(deftype Bar []) | |
;; extending a cljs type | |
(extend-type Bar | |
IFoo (foo [this] (println "Hello from IFoo.foo for Bar"))) |