Skip to content

Instantly share code, notes, and snippets.

View Congee's full-sized avatar
🤔
Focus

Changsheng Wu Congee

🤔
Focus
View GitHub Profile
@Congee
Congee / nikto.rb
Last active August 29, 2015 13:57
nikto 2.1.5 for Mac OS X via Homebrew
require 'formula'
class Nikto < Formula
homepage 'http://cirt.net/nikto2'
url 'https://github.com/sullo/nikto.git', :revision => '8bb017d76e592793da3c06cdbb8d31bfdffdf2eb'
version '2.1.5'
# version 2.1.6 is still under developing
def install
# adjust default paths in perl script
@Congee
Congee / conv_2_utf8.py
Last active August 29, 2015 14:00
convert 2 utf-8
#!/usr/bin/env python3
# encoding: utf-8
import os
import sys
#import chardet
dir = sys.argv[1]
#def convert(source_file):
require "formula"
class Nbtscan < Formula
homepage "http://www.inetcat.net/software/nbtscan.html"
url "http://distcache.freebsd.org/ports-distfiles/nbtscan-1.5.1.tar.gz"
mirror "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/nbtscan-1.5.1.tar.gz"
sha1 "4041d8f6b592fa310b8d3c79c56a2d3263dba82f"
patch :p1 do
url "https://gist.githubusercontent.com/congee/76693bd4b61b862b2333/raw/341b46d867120dc9b3e89a23b49f17e82be39d58/debian-patches-04_fix_compiler_warnings.diff"
@Congee
Congee / tsunami-udp.rb
Created October 19, 2014 12:08
tsunami-udp in Homebrew
require "formula"
class TsunamiUdp < Formula
homepage "http://tsunami-udp.sourceforge.net/"
url "http://superb-dca2.dl.sourceforge.net/project/tsunami-udp/tsunami-udp/tsunami-v1.1-cvsbuild42/tsunami-v1.1-cvsbuild42.tar.gz"
sha1 "e16ae011ad2e953e493c916da4b51a4cdc3425e2"
depends_on "autoconf" => :build
depends_on "automake" => :build
@Congee
Congee / libsvm.rb
Created November 6, 2014 13:02
libsvm for homebrew with python bindings
require 'formula'
class Libsvm < Formula
homepage 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/'
url 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/libsvm-3.18.tar.gz'
sha1 '20bd3e2d21d79c3714007043475b92dfeed29135'
bottle do
cellar :any
revision 1
@Congee
Congee / pycdc.rb
Created January 28, 2015 05:57
pycdc_homebrew_formula
class Pycdc < Formula
homepage "https://github.com/zrax/pycdc"
url "https://github.com/zrax/pycdc.git"
version "HEAD"
depends_on "cmake" => :build
def install
system "cmake", "."
system "make"
@Congee
Congee / nyancat.rb
Created January 28, 2015 05:57
nyancat_homebrew_formula
class Nyancat < Formula
homepage "http://nyancat.dakko.us/"
version "HEAD"
url "https://github.com/klange/nyancat.git"
def install
system "make"
bin.install "src/nyancat"
man1.install "nyancat.1"
end
--- a/unix/Makefile 2015-02-12 22:17:02.000000000 +0800
+++ b/unix/Makefile 2015-02-12 22:17:16.000000000 +0800
@@ -872,7 +872,7 @@
# Macintosh MacOS X (Unix-compatible enviroment), using standard compiler
macosx: unix_make
- $(MAKE) unzips CFLAGS="-O3 -Wall -DBSD" LF2=""
+ $(MAKE) unzips CFLAGS="-O3 -Wall -DBSD" LF2="-liconv"
$(STRIP) $(UNZIPS)
require 'formula'
class Unzip < Formula
homepage 'http://www.info-zip.org/pub/infozip/UnZip.html'
url 'https://downloads.sourceforge.net/project/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz'
version '6.0'
sha1 'abf7de8a4018a983590ed6f5cbd990d4740f8a22'
keg_only :provided_by_osx
@Congee
Congee / pinyin-grep
Created February 23, 2015 10:12
支持拼音首字母检索
#!/usr/bin/env python3
# encoding: utf-8
import pinyin
import sys
import re
query = sys.argv[1]
pattern = re.compile(query)
for line in sys.stdin: