My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
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
<?php | |
/** | |
* Tower Rest API v1.0 | |
* PHP SDK | |
*/ | |
namespace Tower; | |
class TowerRest | |
{ |
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
# Config for Nginx to act as a front-end for Riak | |
# The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc) | |
# Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_) | |
# Config is in /etc/nginx/sites-available/default or somewhere like that | |
# Set up load-balancing to send requests to all nodes in the Riak cluster | |
# Replace these IPs/ports with the locations of your Riak nodes | |
upstream riak_hosts { | |
server 127.0.0.1:8098; |
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
#-*- coding:utf-8 -*- | |
# from Python3WebSpider/CrackGeetest | |
# and did some little changes to fix python2 | |
import time | |
from io import BytesIO | |
from PIL import Image | |
from selenium import webdriver | |
from selenium.webdriver import ActionChains |
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
The primary goal is to swap command and option. | |
The secondary goal is to remap Caps Lock to Control. | |
The tertiary goal is to share modifier keys across keyboards, so you can emacs with two keyboards. | |
The following instructions are good as of 2016-08-24, for OS X El Capitan 10.11.6. | |
Mac OS Sierra broke Seil support; Seil instructs us to consider Karabiner Elements. | |
But when Karabiner Elements swaps command and option, it does it for all keyboards; | |
meaning the native keyboard also gets its command and option swapped, which is bad! |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My Presentation</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<style type="text/css"> | |
.red { color: red } | |
</style> | |
</head> | |
<body> |
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
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。 | |
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能) | |
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考 | |
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks | |
1、 shadowsocks的timeout设置 | |
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。 | |
2、 检查操作系统的各种限制 | |
对于openvz的vps,特别需要检查一下 |
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
windows CMD命令大全及详细解释和语法 | |
引用: | |
http://letle.iteye.com/blog/169045 | |
http://www.cppblog.com/kyelin/archive/2007/04/21/22540.aspx | |
windows批处理程序中的特殊字符 | |
批处理介绍 | |
纯以dos系统而言,可执行程序大约可以细分为五类,依照执行优先级由高到低排列分别是: | |
DOSKEY宏命令(预先驻留内存) |
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
# coding: utf-8 | |
# py2 origin author lrdcq | |
# usage python3 unwxapkg.py filename | |
__author__ = 'Integ: https://github.com./integ' | |
import sys, os | |
import struct | |
class WxapkgFile(object): |
IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。
- https://education.github.com/pack GitHub学生包,需用教育邮箱验证。各种福利,可从DigitalOcean上手
- https://github.com/ripienaar/free-for-dev 本文尽量不与此项目重复
- https://free.zhelper.net/
- https://github.com/AchoArnold/discount-for-student-dev
OlderNewer