Skip to content

Instantly share code, notes, and snippets.

View zerodie's full-sized avatar

ChiaChia Lee zerodie

  • National Taiwan University
  • Taipei
View GitHub Profile
@zerodie
zerodie / thlai
Created October 8, 2014 06:36
thlai
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:c4127bf13e205884a68f050643941af8402579dfbff070d1e9fda58d44136233"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:f634d1fb517a2667f233eae43d3517abd1e30a49624a3f6656b598edd23079e0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@zerodie
zerodie / nginx.conf
Created August 10, 2014 08:48
nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@zerodie
zerodie / r-basic.r
Created July 4, 2014 04:17
r basic
rm(list=ls()) # 清空所有obj
x<-"R is easy to learn!"
y<-3
y<-pi
bol1 <- T
bol2 <- TRUE
bol3 <- F
bol1 == bol2
bol1 & bol2
bol3 | 4 > 5
@zerodie
zerodie / .screenrc
Created March 2, 2014 05:39
zerodie .screenrc
# turns off the license screen
startup_message off
# always use a login shell
#shell -$SHELL
shell -${SHELL}
# cleaner shell title
shelltitle ''
@zerodie
zerodie / redis_backup.rake
Last active December 23, 2015 02:49
redis back up and clean
require File.join(File.dirname(__FILE__), '../../config/environment')
task :redis_bk_and_clean => :environment do
fout = File.open("../redis-backup/redis-backup-and-clean-#{Time.now}.txt",'w')
$redis.keys.each_with_index do |key, k_i|
fout.puts "------- key_#{k_i}: #{key}, type: #{$redis.type(key)} -------"
if $redis.type(key) == "zset"
$redis.zrange(key, 0, -1).each do |member|
fout.puts "#{member}:#{$redis.zscore(key, member)}"
@zerodie
zerodie / git flow and merge pull request
Last active December 17, 2015 17:29
git flow and merge pull request commands
//開始git flow init
zerodie@ChiaChia-Lees-MacBook-Pro ~/g/pagamO> git flow init [2:36:25 on 13-05-25]
//以下一直按enter
Which branch should be used for bringing forth production releases?
- develop
- feature/account_management
- master
Branch name for production releases: [master]
Which branch should be used for integration of the "next release"?
@zerodie
zerodie / games
Created February 9, 2012 13:42
games
<%= render 'systems/header' %>
<%= render 'apps/breadcrumb' %>
<div class="mainbody">
<%= render 'systems/sidenav' %>
<div class="right-column">
<div class="right-nav">
<!--
<ul class="mobile-tablet">
<li><a class="current" href="#">手機</a></li>
<li><a href="#">平板電腦</a></li>
@zerodie
zerodie / new form v3
Created February 7, 2012 18:58
new app
<%= simple_form_for([@system, @app], :remote => true) do |f| %>
<%= f.input :name, :placeholder=>"AppBook" %>
<%#= f.input :price, :as => :float %>
<div class="input numeric float required input-append unit">
<label class="float required" for="app_price"><abbr title="required">*</abbr> 價格</label>
<input class="numeric float required" id="app_price" name="app[price]" required="required" step="any" type="number" placeholder="0.99" /><span class="add-on">美金</span>
</div>
<%= f.input :size, :placeholder=>"20 M" %>
<%= f.input :required_version, :placeholder=>"2.1 以上" %>
<%#= f.association :category, :collection => @categories, :label => "分類" %>
@zerodie
zerodie / new app v2
Created February 6, 2012 07:12
給凱西的版本for 確認
<div class="span9">
<h1>New app</h1>
<form accept-charset="UTF-8" action="/systems/1/apps" class="simple_form app" data-remote="true" enctype="multipart/form-data" id="new_app" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="8wMbn8XgjeElRLtHo5rK87wu2gh1qvAA8Buk0cJBl/k=" /></div>
<div class="input string required"><label class="string required" for="app_name"><abbr title="required">*</abbr> app名稱</label><input class="string required" id="app_name" maxlength="255" name="app[name]" required="required" size="50" type="text" /></div>
<label class="file optional" for="app_logo"> Logo</label><input id="app_logo" name="app[logo]" type="file" />
<div class="input text required"><label class="text required" for="app_desc"><abbr title="required">*</abbr> 簡介</label><textarea class="text required" cols="40" id="app_desc" name="app[desc]" required="required" rows="20"></textarea></div>
<div class=