Skip to content

Instantly share code, notes, and snippets.

View sdlong's full-sized avatar

Allen Cheng sdlong

View GitHub Profile
.all('/get/goto_*', [ValidateToken], (req, res, next)=>{
var jwt = req.jwt
var jwtInfo = req.jwtInfo
var userIP = req.userIP
var secret = req.secret
// 從 request 進來取得的值
var get = req.query; // 取得GET值
var post = req.body;
var actCode = req.params[0]
.all('/get/goto_*', [ValidateToken], (req, res, next)=>{
var jwt = req.jwt
var jwtInfo = req.jwtInfo
var userIP = req.userIP
var secret = req.secret
// 從 request 進來取得的值
var get = req.query; // 取得GET值
var post = req.body;
var actCode = req.params[0]
DEFAULT_USER="sdlong"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
[user]
name = sdlong
email = sdlong.jeng@gmail.com.tw
[color]
diff = auto
status = auto
branch = auto
ui = auto
[alias]
co = checkout
@sdlong
sdlong / agnoster.zsh-theme
Created February 15, 2016 20:16
~/.oh-my-zsh/themes/agnoster.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#
@sdlong
sdlong / production.rb
Last active August 29, 2015 14:26
config/environments/production.rb
config.action_controller.asset_host = "http://assets%d.artstore.com"
@sdlong
sdlong / application.html.erb
Created August 3, 2015 11:20
app/views/layout/application.html.erb
<!DOCTYPE html>
<html>
<head>
<title>Artstore</title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
<body>
@sdlong
sdlong / snippets.cson
Last active July 18, 2016 13:03
ATOM snippets
'.html.erb':
'link_to':
'prefix': 'lt'
'body': '<% link_to("$1", ${2:path}) %>'
'link_to_delete':
'prefix': 'ltd'
'body': '<%= link_to("$1", ${2:path}, method: :delete, data: { confirm: "Are you sure?" } ) %>'
'link_to_icon':
'prefix': 'lti'
'body': """
def xdd
puts "xdd"
end
# -*- encoding : utf-8 -*-
class PageView < ActiveRecord::Base
belongs_to :topic
delegate :category, to: :topic
delegate :board, to: :topic
I# detect `$rvm_path`
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi
# load environment of current project ruby
if