start new:
tmux
start new with session name:
tmux new -s myname
| // suggested shell cmd line to run this: | |
| // | |
| // mongo --shell example2.js | |
| // | |
| // Note: the { out : … } parameter is for mongodb 1.8+ | |
| db.things.insert( { _id : 1, tags : ['dog', 'cat'] } ); | |
| db.things.insert( { _id : 2, tags : ['cat'] } ); | |
| db.things.insert( { _id : 3, tags : ['mouse', 'cat', 'dog'] } ); | |
| db.things.insert( { _id : 4, tags : [] } ); |
| import java.io.Serializable; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import java.util.Map; | |
| import org.springframework.data.domain.Page; | |
| import org.springframework.data.domain.Pageable; | |
| import org.springframework.data.domain.Sort; |
| frontend main *:80 | |
| acl is_foo hdr_dom(host) -i foo | |
| acl is_bar hdr_dom(host) -i bar | |
| use_backend app_foo if is_foo | |
| use_backend app_bar if is_bar | |
| backend app_foo | |
| # app_foo settings go here | |
| var list = document.getElementsByClassName('pl-video-time'); | |
| var time = 0; | |
| function toS(hms) { | |
| var a = hms.split(':'); | |
| while (a.length < 3) { | |
| a.unshift(0); | |
| } | |
| var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]); | |
| return seconds; |