This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Dokuwiki_Nginx_PHP_test | |
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Dullist | |
class Actions < Controller | |
map '/' #this must be called in the derived class?? | |
attr_accessor :tasks | |
def initialize | |
super() | |
@tasks = Task.all | |
@title = '' | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = Regexp.new( | |
'( (http|https|ftp)://)*'+ #protocol:// 可有可無 | |
'( (\d{1,3}\.){3,3}\d{1,3}|'+ #第二段,這邊可能是 IPv4 | |
'((-|\w)+\.)+(tw|com|aero|us|gr)|'+ #或正常suffix的DN | |
'((-|\w)+\.)*localhost )'+ #或localhost | |
'(:\d{1,5})?'+ #:port number | |
'(/\S+)*', Regexp::EXTENDED) #第一個 / 後面就不管他了 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.method('curry', function(){ | |
var slice = Array.prototype.slice, | |
args = slice.apply(arguments), | |
that = this; | |
return function(){ | |
var complete_pack = args.concat(slice.apply(arguments)); | |
if( complete_pack.length < that.arity ) { | |
return that.curry.apply(that, complete_pack); | |
} | |
else return that.apply(null, complete_pack); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fibonacci = function() { | |
var memo = [0, 1]; | |
var fib = function (n) { | |
var result = memo[n]; | |
if (typeof result !== 'number') { | |
result = fib(n - 1) + fib(n - 2); | |
memo[n] = result; | |
} | |
return result; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var memoizer = function (memo, fundamental) { | |
var shell = function (n) { | |
var result = memo[n]; | |
if (typeof result !== 'number') { | |
result = fundamental(shell, n); | |
memo[n] = result; | |
} | |
return result; | |
}; | |
return shell; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var memoizer = function (memo, fundamental) { | |
var make_query = function(args) { | |
var i = 0, query = ''; | |
for( ; i < args.length - 1 ; i += 1 ) { | |
query += args[i] + ','; | |
} | |
query += args[i]; // i == args.length - 1 | |
return query; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<NotepadPlus> | |
<UserLang name="Scala" ext="scala"> | |
<Settings> | |
<Global caseIgnored="no" /> | |
<TreatAsSymbol comment="no" commentLine="yes" /> | |
<Prefix words1="no" words2="no" words3="no" words4="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Delimiters">\'0"'0</Keywords> | |
<Keywords name="Folder+">{</Keywords> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOL | |
@ @@ | |
@@ @ @@ | |
@@ @@ @@@@ @@@ | |
@@@@@@@@@@@ | |
@@@ @@@@ | |
@@@@@@@ @@@ @@@@@ | |
@@@@@@@ @ @@ @@@ | |
@@@@@@@ @@ @@@@ @@ @ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* list color 字記得改成 416A7A */ | |
pre { margin: 0; } | |
ol { list-style-type: decimal; } | |
ol ol, ol ol ol ol, ol ol ol ol ol ol { | |
list-style-type: none; | |
counter-reset: item; | |
margin: 0 0 0 2em; |
OlderNewer