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
abstract class Asset { | |
abstract getDetails(): string[]; | |
} | |
class Machine implements Asset { | |
constructor( | |
private readonly machineId: number, | |
private readonly machineModel: string, | |
private readonly machineName: string, | |
) {} |
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
const SEP = '.'; | |
/** | |
* traversal an object and flatten its nested objects property keys, | |
* concatted by a `.` into a single level non-nested object | |
* | |
* @param obj object | |
* | |
* @returns object | |
*/ |
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
javascript:void document.getElementById('youtubePlayer').remove(); |
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
class ClassName : NSObject { | |
static var i = 0 | |
// static / class function (seems the same) | |
static func fn() {} | |
class func fn2() {} | |
init() {} |
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
// | |
// NSObjectExtension.h | |
// KeyOUcare | |
// | |
// Created by CYWang on 2015/1/27. | |
// Copyright (c) 2015年 OUcare. All rights reserved. | |
// | |
#ifndef KeyOUcare_NSObjectExtension_h | |
#define KeyOUcare_NSObjectExtension_h |
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
// check the prototype | |
function init(args){ | |
if (Object.getPrototypeOf(this) !== init.prototype) { | |
// called without `new` | |
return new init(args); | |
} | |
this.args = args; | |
} | |
// check the constructor |
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
# RUN apt-get update && apt-get -y install build-essential | |
FROM mugen/ubuntu-build-essential:latest | |
# install redis | |
ADD http://download.redis.io/redis-stable.tar.gz /tmp/ | |
RUN cd /tmp && tar xzf redis-stable.tar.gz | |
RUN cd /tmp/redis-stable && make | |
RUN cd /tmp/redis-stable/src && cp redis-server /usr/bin/; cp redis-cli /usr/bin/ | |
# run redis server |
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
FROM ubuntu:latest | |
# install nodejs | |
ADD http://nodejs.org/dist/v0.10.20/node-v0.10.20-linux-x64.tar.gz /tmp/ | |
RUN cd /tmp && tar xzf node-v0.10.20-linux-x64.tar.gz --strip-components=1 -C "/usr" | |
# install git | |
RUN apt-get update && apt-get install -y git |
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
from gevent.monkey import patch_all | |
patch_all() | |
import argparse | |
from wsgidav.fs_dav_provider import FilesystemProvider | |
from wsgidav.version import __version__ | |
from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp | |
from gevent.pywsgi import WSGIServer | |
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
i[class*="foundicon-"] { | |
font-style: inherit; | |
} | |
i[class*="foundicon-"]:before { | |
font-family: "GeneralFoundicons"; | |
} | |
i[class*="enclosed foundicon-"]:before { | |
font-family: "GeneralEnclosedFoundicons"; |
NewerOlder