Skip to content

Instantly share code, notes, and snippets.

View dylanninin's full-sized avatar
🏠
Working from home

dylanninin dylanninin

🏠
Working from home
View GitHub Profile
@dylanninin
dylanninin / nginx.prerender.conf
Last active August 29, 2015 14:26 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx https://prerender.io/documentation/install-middleware#nginx
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
sudo apt-get update
sudo apt-get install openjdk-6-jre-headless -f
sudo apt-get install curl
sudo apt-get install unzip
sudo apt-get install openssh-server
sudo curl -OL http://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.8.zip
sudo unzip elasticsearch-* && rm elasticsearch-*.zip
cd elasticsearch-0.19.8
sudo mkdir /usr/local/elasticsearch

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@dylanninin
dylanninin / .gitconfig
Created February 18, 2016 16:36 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@dylanninin
dylanninin / my_doc_manager.py
Last active March 16, 2016 09:29
Create an Oplog Process File
from mongo_connector.compat import u
from mongo_connector.doc_managers.doc_manager_base import DocManagerBase
class DocManager(DocManagerBase):
def __init__(self, url=None, **kwargs):
pass
import jieba
seg_list = jieba.cut("我来到北京清华大学", cut_all=True)
print("Full Mode: " + "/ ".join(seg_list))
# Full Mode: 我/ 来到/ 北京/ 清华/ 清华大学/ 华大/ 大学
seg_list = jieba.cut("我来到北京清华大学", cut_all=False)
print("Default Mode: " + "/ ".join(seg_list))
# Default Mode: 我/ 来到/ 北京/ 清华大学
seg_list = jieba.cut_for_search("我来到北京清华大学")
@dylanninin
dylanninin / 词性标记.md
Created May 16, 2016 10:27 — forked from luw2007/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

  • 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
  • 虚词:副词、介词、连词、助词、拟声词、叹词。

ICTPOS3.0词性标记集

n 名词

nr 人名

class MiddleWare1
def initialize(app)
@app = app
end
def call env
puts self.class
status, headers, body = @app.call(env)
append_str = "\nGreetings from #{self.class}"
@dylanninin
dylanninin / ngx-phase-handlers.stp
Last active November 4, 2016 04:09
ngx-phase-handlers.stp with comments
/*
Dumped by ngx-phase-handlers of openresty-systemtap-tools
- Ubuntu 16.04
- 2016-11-03
*/
/* probe begin event */
probe begin {
/* target() return pid specifed as "stap -x pid ngx-phase-handlers.stp" */