Skip to content

Instantly share code, notes, and snippets.

Yang He abruzzihraig

Block or report user

Report or block abruzzihraig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View docker-etcd-compose.yml
version: '2'
services:
etcd1:
image: quay.io/coreos/etcd:v3.2.5
restart: always
ports:
- 23791:2379
- 23801:2380
volumes:
@xameeramir
xameeramir / default nginx configuration file
Last active Nov 12, 2019
The default nginx configuration file inside /etc/nginx/sites-available/default
View default nginx configuration file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@sanjeevshrestha
sanjeevshrestha / telegraf-dockercompose.yml
Last active Oct 11, 2019
Telegraf Docker Compose file
View telegraf-dockercompose.yml
telegraf:
image: telegraf
restart: always
environment:
HOST_PROC: /rootfs/proc
HOST_SYS: /rootfs/sys
HOST_ETC: /rootfs/etc
hostname: localhost
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
@idiotWu
idiotWu / themr.js
Last active Mar 29, 2017
Another theme-able solution for react reusable components.
View themr.js
/*
* Usage:
*
* As a decorator:
*
* import defaultTheme from './style.scss';
*
* @themr(defaultTheme)
* class Comp extends React.Component { ... }
*
@abruzzihraig
abruzzihraig / angular-amap.js
Last active Jul 5, 2016
AMap/高德地图 module wrapper with angular
View angular-amap.js
/*
* The module amap below is a simplest implementation, there is no any updated or proper libraries when I wrote it.
* Since there is a new full-feature library which wrote by another guy, so I just recommend it below.
* https://github.com/leftstick/angular-amap
*
* If you just want version with a few features like below, you could just build your version on top of it.
*/
angular.module('amap', [])
.constant('amapConstant', {
@idiotWu
idiotWu / attach-events.js
Last active Oct 6, 2017
attach-events decorator for react
View attach-events.js
/**
* @decorator
* Attach events to DOM element
*
* @param {Element|Function} elemOrFunc: DOM Element, or a function returns element
* @param {String} events: a list events separated with ','
*
* Usage:
* @attachEvents(window, 'click')
* handleWindowClick(evt) {
@bjhomer
bjhomer / instructions.md
Last active Dec 27, 2017
How to make the Day One command line tool automatically write to Day One 2
View instructions.md

Using the Day One CLI with Day One 2

The dayone command line tool was originally written to work with Day One Classic, and by default writes its entries to the default Day One Classic journal directory1. If you want to use the dayone tool to write entries in to Day One 2 instead, there are a couple options.




Option 1. Use this option if you don't use Day One Classic at all.

View rxjs_operators_by_example.md
@kryss
kryss / 撤掉X5情愿书
Last active Aug 7, 2019
撤掉X5情愿书
View 撤掉X5情愿书
我是一个普通的H5开发者,我们花了10来个月做了一款微信应用,
但是因为最新版本的微信,选择使用了还没成熟的X5浏览器,
导致我们的应用在安卓版上完全无法使用 REST H5特效。
我相信这个世界上还有很多和我一样,因为这个问题头痛的开发猿。
所以希望能通过这个请愿书,感动TX的领导们,你们向他们学习:https://github.com/crosswalk-project/crosswalk
希望你们不要让我们开发者失望,X5真的是没法用,而且也没法改成能用,很多项目真的等不了。
如果你是开发猿请加颗星,希望能通过群众的响应改善大家的开发环境。
@CMCDragonkai
CMCDragonkai / curl_custom_dns.sh
Last active Sep 16, 2019
cURL: Selecting a custom DNS server to resolve domain names
View curl_custom_dns.sh
#!/usr/bin/env bash
# this can be useful when developing against a custom DNS server, or
# for example, if you made a change to the DNS settings of a domain, and you
# know the authoritative nameserver IP address for a domain, you could use this
# to bypass the intermediate DNS cache, and apply an HTTP request using the new
# DNS settings supplied by your specified (authoritative) nameserver
curl --dns-servers <dns.ip,dns.ip> url.com
You can’t perform that action at this time.