Skip to content

Instantly share code, notes, and snippets.

View zcong1993's full-sized avatar
🎯
Focusing

featherlight zcong1993

🎯
Focusing
View GitHub Profile
import { createHook } from 'async_hooks'
export interface HookInfo<T = any> {
id: number
triggerId: number
activated: boolean
parent?: HookInfo<T>
contextData?: T
}
FROM zcong/echo as external
FROM envoyproxy/envoy-alpine:latest
COPY --from=external /usr/bin/echo /usr/bin/
ADD ./start.sh /usr/local/bin/start.sh
RUN chmod +x /usr/local/bin/start.sh
ENTRYPOINT /usr/local/bin/start.sh
version: '2'
services:
proxy:
image: envoyproxy/envoy:latest
volumes:
- ./simple-proxy.yaml:/etc/front-envoy.yaml
networks:
- envoymesh2
expose:
@zcong1993
zcong1993 / unhide.bat
Last active June 2, 2017 14:48
unhide ubuntu on windows system folder
// maybe should run at C:\Users\USERNAME\AppData\Local
attrib -s -h lxss
user www www;
worker_processes auto;
error_log /home/wwwlogs/nginx_error.log crit;
pid /usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme",
"create_window_at_startup": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 19,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
html, body, #root, .container {
height: 100%;
}
.container {
margin-right: auto;
margin-left: auto;
/*background-color: #eee;*/
}
.container {
margin-left: auto;
margin-right: auto;
max-width: 768px;
background-color: #FCFAF2;
}
html, body, #app, .container, .content {
min-height: 100%;
}
<?php
class DB {
private $db;
private $tableName;
public function __construct($tableName = 'data', $fileName = 'data')
{
$this->db = new PDO("sqlite:". $fileName .".sqlite3");
$this->tableName = $tableName;
$this->createTable($tableName);
var ctx = document.querySelector("canvas").getContext("2d"),
// dash-length for off-range
dashLen = 220,
// we'll update this, initialize
dashOffset = dashLen,
// some arbitrary speed
speed = 5,