curl -sL https://github.com/jpm4j/jpm4j.installers/raw/master/dist/biz.aQute.jpm.run.jar > jpm4j.jar
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 System | |
| import Microsoft | |
| import Microsoft.Win32.Registry as Registry | |
| from System.Threading import Thread, ThreadStart | |
| def get_default_browser(): | |
| try: | |
| key = Registry.ClassesRoot.OpenSubKey("HTTP\shell\open\command", False) | |
| browser = key.GetValue(None).ToString().ToLower() | |
| if browser.startswith('"'): |
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
| package util.validate | |
| import scala.util.{Failure, Success, Try} | |
| object `package` { | |
| class ValidationError(val msg: String) extends Exception(msg) | |
| case object InvalidType extends ValidationError("invalid type") | |
| def typeChecker[T: Manifest](v: Any): Try[Any] = v match { | |
| case v: T => Success(v) |
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 sqlite3 | |
| ######################################## | |
| # simple json dataset via sqlite3 | |
| ######################################## | |
| class StatusDataset(object): | |
| def __init__(self, db, name, create=True): | |
| self._db = db | |
| self._name = name |
A way to work around this issue in flask.
class BlueFactory(object):
_seq = 0
def __init__(self, name, *args, **kwargs):
self.base_name = name
self.bp_args = args
self.bp_kwargs = kwargsNewerOlder