This file contains hidden or 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
| #!/bin/sh | |
| kill -9 $(echo `ps aux | grep tomcat | grep -v grep |awk '{print $2}'`) |
This file contains hidden or 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
| import akka.stm._ | |
| import scala.collection.immutable.ListMap | |
| case class LRUCache[A, B](private val MAX_ENTRIES: Int) | |
| { | |
| protected val cache = Ref(ListMap.empty[A, B]) | |
| def getOrElse(key: A)(fn: => B): B = { | |
| get(key).getOrElse { | |
| val result = fn |
This file contains hidden or 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
| class LRUCache | |
| constructor: (size_limit) -> | |
| @limit = size_limit or Infinity | |
| @data = {} | |
| @size = 0 | |
| @order = [] | |
| set: (key, val) -> | |
| @data[key] = val | |
| @size++ | |
| @order.push key |
This file contains hidden or 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
| gulp.task "clean", -> | |
| gulp.src('dist', read: false) | |
| .pipe clean() | |
| gulp.task "one", -> | |
| gulp.task "two", -> | |
| gulp.task "three", -> | |
| gulp.task "default", ["clean"], -> | |
| gulp.start ["one","two","three"] |
This file contains hidden or 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
| gulp.task "one" -> | |
| gulp.task "two", ["one"], -> | |
| gulp.task "three", ["two"], -> | |
| gulp.task "default" ["one","two","three"] # now they should execute in order, this is not ideal for cleaning at all as clean may need ot be a dependency everywhere |
This file contains hidden or 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
| gulp.task "one", -> | |
| gulp.task "two", -> | |
| gulp.task "three", -> | |
| gulp.task "default" ["one","two","three"] |
This file contains hidden or 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
| /* | |
| let me google that for you (many ways to skin this cat) | |
| http://stackoverflow.com/questions/10209704/set-google-maps-container-div-width-and-height-100 (implemented here) | |
| http://stackoverflow.com/questions/2821596/100-height-with-fixed-footer-and-embedded-google-map | |
| */ | |
| body, html { | |
| height: 100%; | |
| width: 100%; | |
| } |
This file contains hidden or 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
| /* your source here */ | |
| .Bdc.FQb{ | |
| display:none; | |
| } | |
| .vyd{ | |
| display:none; | |
| } | |
| .Of.ooe.Xt.N3.gb_gbsf.gb_gbshc{ |
This file contains hidden or 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
| #!/bin/sh | |
| port=${1:-8000} | |
| lsof -i:$port | grep -v PID | awk '{print $2}' |
OlderNewer