Skip to content

Instantly share code, notes, and snippets.

@quangv
quangv / controllers_main.coffee
Created May 29, 2012 23:24
Simple Multiple functions to map to same route Spine.js
class Main extends Spine.Controllers
constructor : ->
super
@routes
'/app*glob' : ->
# do something
module.exports = new Main
@quangv
quangv / controllers-main.coffee
Created May 30, 2012 16:06
Proposal: Ability to fire routes additions if necessary Spine.js
class Main extends Spine.Controller
constructor : ->
super
@routes { # called after init routes have been loaded, manual trigger needed if path match.
'/app/main' : ->
# do stuff
}, trigger:true
module.exports = Main
@quangv
quangv / content.coffee
Created June 6, 2012 23:48 — forked from stephenvisser/content.coffee
Controller-scoped routes using Spine.js
require('spine/lib/manager')
class Main extends Spine.Stack
routes:
'adventure': 'adv'
'home': 'home'
'information': 'info'
controllers:
info: Information
home: Home
@quangv
quangv / ReadMe.md
Last active August 29, 2015 14:17
PivotalTracker Solo-Mode Scripts

Minimalistic view for PivotalTracker Solo-Mode.

blog post

The CSS and JS can be loaded into pivotaltracker with extensions like: minimalist

@quangv
quangv / .babelrc
Last active December 10, 2016 07:13
Monaca Vue.js Webpack config
{
"presets": ["es2015"]
}
@quangv
quangv / LICENSE
Last active October 4, 2017 06:04
Redux HOC Wrapper
Copyright 2017 Quang Van
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@quangv
quangv / gist:42732a0c15552122feec1781ca6850cc
Created April 6, 2018 15:04
Fulcro figwheel websocket-host
quang [2:47 AM]
Is there anyway to `./run-tutorial.sh` with a different `:websocket-host` ?
quang [3:32 AM]
I tried added `:websocket-host :js-client-host` to `tutorial` id in `project.clj` but that didn't work... I ended up having to edit the compiled `resources/public/js/tutorial/figwheel/client/socket.js` manually.
`JVM_OPTS=-Dfigwheel.port=8001 ./run-tutorial.sh` should do it for JDK8. The console message will still say 8080, but you can ignore it. For JDK 9, you’ll need: `JVM_OPTS="--add-modules java.xml.bind -Dfigwheel.port=8001" ./run-tutorial.sh`
@quangv
quangv / .env
Last active July 3, 2018 15:21
AWS Lambda shell scripts
# Environment varialbes goes here
SAY='hello'
https://www.youtube.com/watch?v=BHhA_ZKjyxo
How to manage your remote terminal sessions with tmux. If you keep lots of terminal windows open or use a tiling window manager such as i3, you'll love tmux for doing the same thing on a remote machine. This video covers the basics of using tmux.
A quick cheatsheet (partially inspired by http://www.danielmiessler.com/study/t... ):
# session management
tmux ls (or tmux list-sessions)
tmux new -s session-name
Ctrl-b d Detach from session
@quangv
quangv / tmux_cheatsheet.markdown
Created September 9, 2019 06:23 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: