Instantly share code, notes, and snippets.

View index.ts
...
import { Element } from './element';
type PublicElement = OmitKey<Element, 'driver'>;
type PublicElement_CTOR = {new (): PublicElement};
declare const ClassPublicElement: PublicElement_CTOR;
export { PublicElement };
...
View index.js
...
var element_1 = require("./element");
exports.Element = element_1.Element;
...
View index.ts
...
export { Element } from './element';
...
View customdate.ts
export class CustomDate {
private readonly date: Date;
constructor(date: Date) {
this.date = date;
}
public get day(): string {
const day = this.date.getDate();
View gist:baa836fcd8723c9845ff5b43ed9afda2
const Future = require("fibers/future");
const syncify = (asyncFunc) => {
return (args) => {
const future = new Future();
asyncFunc(args).then(result => future.return(result));
return future.wait();
}
};
View gist:5e9998fa294898ad6a14e9b10e19bc72
docker run --rm --name nginx -p 8080:80 -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro nginx:local nginx -V
nginx version: nginx/1.10.3
built with OpenSSL 1.1.0f 25 May 2017
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-0TiIP5/nginx-1.10.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-ht
View gist:58b8bd375633b297346a170639fb8877
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
View gist:8dd35744c269eb687ba10403f9be0af4
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
View gist:85152ee60114f6a1fb42e112690a860d
FROM nginx:latest
RUN DEBIAN_FRONTEND=noninteractive && \
apt update && \
apt dist-upgrade -y && \
apt install -y nginx-extras ca-certificates gettext-base curl && \
rm -rf /var/cache/apt && rm -rf /var/lib/apt
CMD ["nginx", "-g", "daemon off;"]
View gist:f02a9be37c006b1498a4421da4a7394a
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {