Skip to content

Instantly share code, notes, and snippets.

View ericluo's full-sized avatar
🎯
Focusing

Eric ericluo

🎯
Focusing
View GitHub Profile
@ericluo
ericluo / navigation.yml
Created March 6, 2017 11:11
jekyll navigation menu
# main links
main:
- title: "首页"
url: /
- title: "技术文档"
url: /docs/study_guide/
- title: "名言警句"
url: /quotes/
- title: "About"
url: /about/
# Powered By Igge.gq
# Last updated: 2016-10-23
# This work is licensed under a CC BY-NC-SA 4.0 International License.
# https://creativecommons.org/licenses/by-nc-sa/4.0/
# Localhost (DO NOT REMOVE)
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
# Modified hosts start
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
# Rake task to launch multiple Resque workers in development/production with simple management included
require 'resque/tasks' # Require Resque tasks
namespace :workers do
# = $ rake workers:start
#
# Launch multiple Resque workers with the Rails environment loaded,
# so they have access to your models, etc.
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
You can run this command from the DB2 command line processor (CLP) or from inside a SQL application by calling the ADMIN_CMD stored procedure
EXPORT TO result.csv OF DEL MODIFIED BY NOCHARDEL SELECT col1, col2, coln FROM testtable;
There are lots of options for IMPORT and EXPORT that you can use to create a data file that meets your needs. The NOCHARDEL qualifier will suppress double quote characters that would otherwise appear around each character column.
Keep in mind that any SELECT statement can be used as the source for your export, including joins or even recursive SQL. The export utility will also honor the sort order if you specify an ORDER BY in your SELECT statement.
@ericluo
ericluo / gist:7109610
Created October 22, 2013 22:55
R script
library('RJDBC')
drv <- JDBC("org.postgresql.Driver", "/path-to-jar")
con <- dbConnect(drv, "jdbc:postgresql:sms")
@ericluo
ericluo / tmux.conf
Created March 17, 2012 16:13 — forked from bryanl/tmux.conf
I copied this from somewhere. It is a good start, though
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
@ericluo
ericluo / tpl-basicapp.rb
Created June 4, 2011 13:28 — forked from davidrichards/tpl-basicapp.rb
Rails 3, RSpec, Factory_Girl, HAML, SASS, Devise, JQuery, Backbone.js, jammit
## Rails App Template
## Updated for Rails 3.0.7
## Created on 10/23/10
## Updated on 5/25/11 to simplify for my own use
## Run using $ rails new [appname] -JT -m tpl-basicapp.rb
## Gems
# Warden and Devise for security
gem 'warden', '1.0.4'
This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell))
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.1
# Switch to 1.9.1
∴ rvm 1.9.1
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiqJaxtDky9YyqK0uQ1czpijxEHlG28Tk7O773EGFI32+whLaxqqDojWddojm36XvJ6uags3rtwIxJFh/r6QkR6u45q+Vggtb5uDq9Exe+8y+/2zBcLALfuXKunwNATyH7Z7jgG/0MS3jj0vVhp/Byrw7KAuR7a4pQSNYJpJuC3M= rsa-key-20091010