Skip to content

Instantly share code, notes, and snippets.

# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
zh-TW:
devise:
confirmations:
confirmed: "您的帳號已通過驗證,現在您已成功登入。"
send_instructions: "您將在幾分鐘後收到一封電子郵件,內有驗證帳號的步驟說明。"
send_paranoid_instructions: "如果我們有您的信箱,您將會收到一封驗證您的帳號的電子郵件。"
failure:
already_authenticated: "您已經登入。"
hello = "Hello, this is Python."
py = "Python is fantastic."
rb = "Ruby is my favorite."
q = "OAO a question here !?"
print rb[:5] + hello[4] + rb[15] + hello[-8:-1] + q[-1]
@danny8376
danny8376 / .screenrc
Last active December 3, 2023 18:09
my .screenrc
# Start message
startup_message off
# Set hardstatus always on
caption always "%{=u .R} %-w%{=ub .m}%n %t%{=u .R}%+w "
hardstatus alwayslastline "%{= .Y} [%l] %<%=%{= .g}@%H (%n %t) %=%{G}%e %{= .c}%Y/%m/%d%{= .M} %C %A"
# Set default encoding using utf8
defutf8 on
# 自分の得意な言語で
# Let's チャレンジ!!
# Normal way
=begin
sum = 0
# first input is the count of lines
gets.to_i.times do
sum += gets.to_i
#1
https://paiza.jp/poh/enkoi-second/35d694ad
#2
https://paiza.jp/poh/enkoi-third/a895194b
#3
https://paiza.jp/poh/enkoi-ending/207ef35a?o=41a525e3
#3-2nd
https://paiza.jp/poh/enkoi-ending/1fe8d021?o=41a525e3
# 自分の得意な言語で
# Let's チャレンジ!!
# Normal way
=begin
sum = 0
# first input is the count of lines
gets.to_i.times do
required, now, price = gets.split(" ").map{|i| i.to_i}
# 自分の得意な言語で
# Let's チャレンジ!!
# Rubyは怖いです
# too slow QQ
=begin
block, total = gets.split(" ").map{|i| i.to_i}
pieces = total.times.map{gets.to_i}
-- SQLFiddle : http://sqlfiddle.com/#!2/f0e3bd/4
-- SQLを書こう!
SELECT d.division_name, count(*)
FROM division AS d LEFT JOIN member AS m
ON d.division_id = m.division_id
GROUP BY d.division_id;
@danny8376
danny8376 / resolver_ptr_cname.patch
Last active December 9, 2015 18:06
nginx resolve ptr cname patch
--- src/core/ngx_resolver.c.orig 2015-04-21 22:11:59.000000000 +0800
+++ src/core/ngx_resolver.c 2015-12-10 01:13:54.230523751 +0800
@@ -2012,7 +2012,7 @@
int32_t ttl;
ngx_int_t octet;
ngx_str_t name;
- ngx_uint_t i, mask, qident, class;
+ ngx_uint_t i, mask, qident, type, class;
ngx_queue_t *expire_queue;
ngx_rbtree_t *tree;
From 4bb4f986c696fa4ca267481a55de461980760b75 Mon Sep 17 00:00:00 2001
From: Jiale Zhi
Date: Wed, 14 Oct 2015 17:51:06 -0700
Subject: [PATCH] Add SPDY support back to Nginx with HTTP/2
---
auto/modules | 28 +
auto/options | 3 +
src/core/ngx_connection.h | 1 +
src/http/modules/ngx_http_ssl_module.c | 52 +-