Skip to content

Instantly share code, notes, and snippets.

View itsimba's full-sized avatar

simba itsimba

View GitHub Profile
:: Set primary and alternate DNS for IPv4 on Windows Server 2000/2003/2008 &
:: Windows XP/Vista/7
@ECHO OFF
SETLOCAL EnableDelayedExpansion
SET adapterName=
FOR /F "tokens=* delims=:" %%a IN ('IPCONFIG ^| FIND /I "ETHERNET ADAPTER"') DO (
SET adapterName=%%a
@itsimba
itsimba / 词性标记.md
Created June 22, 2016 08:28 — forked from luw2007/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

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

ICTPOS3.0词性标记集

n 名词

nr 人名

<?php
/**
* Batch Mockup
*
* I placed this in my BaseController.php file
*
* @usage
* $batch = new Batch('stats');
* $batch->columns = ['score', 'name'];
* $batch->data = [
@itsimba
itsimba / vim74centos
Created September 22, 2015 15:04 — forked from juxtin/vim74centos
Compile Vim 7.4 on Centos and install my vimrc
#!/bin/bash
yum groupinstall 'Development tools' -y
yum install ncurses ncurses-devel wget git -y
cd /usr/local/src
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar -xjf vim-7.4.tar.bz2
cd vim74
./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp
make && make install
@itsimba
itsimba / dnspod_ip.go
Last active September 10, 2015 12:14 — forked from yinheli/dnspod_ip.go
通过 dnspod 获取本机出口ip
package main
import (
"fmt"
"net"
"time"
)
func main() {
conn, err := net.DialTimeout("tcp", "ns1.dnspod.net:6666", time.Second*2)
#user nobody;
worker_processes 8;
worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
# changes from http://www.cyberciti.biz/faq/linux-kernel-etcsysctl-conf-security-hardening/
# Protect ICMP attacks
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Turn on protection for bad icmp error messages
net.ipv4.icmp_ignore_bogus_error_responses = 1
# Turn on syncookies for SYN flood attack protection
net.ipv4.tcp_syncookies = 1