Skip to content

Instantly share code, notes, and snippets.

Chris Kim cj3kim

Block or report user

Report or block cj3kim

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 install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

View gist:df0bdbaf8fc83b861e19
var _this = this;
var attributes;
this._eventInput.on('reset-ad-details', function (model) {
attributes = model.attributes;
attributes.setClass = true;
_this.surface.setContent(<AdDetailsComponent { ...attributes } />);
View gist:e9512711a83a57379b36
login: Promise.method(function (email, password) {
if (!email || !password) throw new Error("Email and password are both required.");
var storage = { user: null };
var fetchPromise = new this({ email: email.toLowerCase().trim() })
.fetch({ require: true })
.then(function (user) {
this.user = user;
return bcrypt.compareAsync(password, user.get('password'))
View gist:9885921ccdc4b5d754d8
Backbone.$ = Zepto
var deferred = collection.fetch()
console.log --> XMLHttpRequest
View toolbar.js
var React = require('react');
var Toolbar = React.createClass({
render: function () {
return (
<div id="toolbar-toolbar" className="toolbar ql-toolbar ql-snow">
<span className="ql-format-group">
<select title="Size" className="ql-size" >
<option value="16px">Normal</option>
View serialize.js
/*jslint continue:true*/
* Adapted from {@link}
* Changes:
* Ensures proper URL encoding of name as well as value
* Preserves element order
* XHTML and JSLint-friendly
* Disallows disabled form elements and reset buttons as per HTML4 [successful controls]{@link}
* (as used in jQuery). Note: This does not serialize <object>
* elements (even those without a declare attribute) or
cj3kim / gist:a8bdcd43917ce759688d
Created Feb 24, 2015
backbone/famous strategy
View gist:a8bdcd43917ce759688d
var fs = require('fs');
// create the main context
var mainContext = Engine.createContext();
var $ = require('zepto-browserify').$;
var $template = $(fs.readFileSync( __dirname + '/templates/navbar.html', 'utf8'));
var navbarMod = new Modifier();
var navbarSurface = new Surface({
cj3kim / Return-part-vector
Created Jul 1, 2014
Why doesn't this loop work appropriately?
View Return-part-vector
(defn return-part-vector [column-count current-row j]
(loop [ part-vector [] k 0]
(if (< k column-count)
(if (not= j k)
(let [current-column (nth current-row k)]
(recur (conj part-vector current-column) (inc k))))
(println "Do nothing")
cj3kim / Error
Created Jun 27, 2014
What is wrong with the for loop?
View Error
clojure.lang.Compiler$CompilerException: clojure.lang.ArityException: Wrong number of args (3) passed to: core/for, compiling:(/Users/chriskim/Desktop/promethix/src/promethix/orthanormal/solver.clj:7:5)
View DirectoryStructure
You can’t perform that action at this time.