Skip to content

Instantly share code, notes, and snippets.

Avatar

rongyi rongyi

View GitHub Profile
@rongyi
rongyi / main.go
Created Nov 10, 2017 — forked from mschoebel/main.go
Snippet: login/logout (Golang)
View main.go
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling
@rongyi
rongyi / gist:32796d775240cb7cc58e7c6e3e56f59d
Created Sep 2, 2016 — forked from nschum/gist:2626303
better "enum class" indent in Emacs
View gist:32796d775240cb7cc58e7c6e3e56f59d
;; This hack fixes indentation for C++11's "enum class" in Emacs.
;; http://stackoverflow.com/questions/6497374/emacs-cc-mode-indentation-problem-with-c0x-enum-class/6550361#6550361
(defun inside-class-enum-p (pos)
"Checks if POS is within the braces of a C++ \"enum class\"."
(ignore-errors
(save-excursion
(goto-char pos)
(up-list -1)
(backward-sexp 1)
@rongyi
rongyi / nodejs-repl-eval.el
Created Aug 26, 2016 — forked from emallson/nodejs-repl-eval.el
Evaluation functions for the `nodejs-repl' Emacs package.
View nodejs-repl-eval.el
;;; nodejs-repl-eval.el --- Summary
;;; Commentary:
;;;
;;; Evaluation functions for the `nodejs-repl' package. Written on a stormy
;;; night between days of node hacking.
;;;
;;; Code:
(require 'js2-mode)
(require 'nodejs-repl)
View .tern-project
{
"libs": [
"browser",
"underscore",
"jquery"
],
"plugins": {
"node": {}
}
}
You can’t perform that action at this time.