As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
<img src="/videoStream" id="video"/> | |
<script src="socket.io/socket.io.js"></script> | |
<script> | |
var socket = new io.Socket(null,{port:8080}); | |
socket.connect(); | |
socket.on('connect',function(){ | |
document.getElementById('mensajes').innerHTML = "conectado"; | |
}) |
package main | |
import ( | |
"os" | |
"fmt" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and | |
// a slice of URLs found on that page. |
var swipeFunc = { | |
touches : { | |
"touchstart": {"x":-1, "y":-1}, | |
"touchmove" : {"x":-1, "y":-1}, | |
"touchend" : false, | |
"direction" : "undetermined" | |
}, | |
touchHandler: function(event) { | |
var touch; | |
if (typeof event !== 'undefined'){ |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
// Lack of tail call optimization in JS | |
var sum = function(x, y) { | |
return y > 0 ? sum(x + 1, y - 1) : | |
y < 0 ? sum(x - 1, y + 1) : | |
x | |
} | |
sum(20, 100000) // => RangeError: Maximum call stack size exceeded | |
// Using workaround |
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
# encoding: utf-8 | |
def company_serial_no_checker(serial) | |
# 共八位,全部為數字型態 | |
at_least_8_digits = /^\d{8}$/ | |
return false unless at_least_8_digits.match(serial) | |
# 各數字分別乘以 1,2,1,2,1,2,4,1 | |
# 例:統一編號為 53212539 |
#!/usr/bin/ruby | |
if ARGV.size.zero? | |
puts %Q[ | |
Usage: | |
./to_csv.rb file.yml > out.csv | |
] | |
exit | |
end |