Skip to content

Instantly share code, notes, and snippets.

View gnemoug's full-sized avatar

alpha gnemoug

  • Beijing, china
View GitHub Profile
@gnemoug
gnemoug / statist.sh
Created December 16, 2018 09:06 — forked from demonnico/statist.sh
统计项目中代码行数
//.m文件的行数
find . -name "*.m" | xargs wc -l
//.m .h .xib .c 文件内容总行数
find . -name "*.m" -or -name "*.h" -or -name "*.xib" -or -name "*.c" |xargs grep -v "^$"|wc -l
#!/bin/bash
# Plant rope vim's plugin
# This is a script to install or update 'ropevim'
# Copyright Alexander Artemenko, 2008
# Contact me at svetlyak.40wt at gmail com
function create_dirs
{
mkdir -p src
wget -q -O - https://raw.github.com/gist/2204072/install_tmux_1.6_on_ubuntu_10.04.sh | sudo bash
class UpYunStore(object):
APP_NAME = None
USERNAME = None
PASSWORD = None
TMP_PATH = None
def __init__(self, uri):
assert uri.startswith('http://')
self.upyun = UpYun(self.APP_NAME, self.USERNAME, self.PASSWORD)
self.prefix = '/' + uri.split('/')[-1]
@gnemoug
gnemoug / find_file.py
Last active December 16, 2015 08:49
查找指定目录下指定扩展名的文件,可以将信息打印和保存到文件中
#!/usr/bin/python
#-*-coding:utf8-*-
"""
使用说明
1.输入要查找的特定目标文件扩展名,来遍历查找特定扩展名的文件,eg:python find_file.py txt /home
2.通过-f指定将结果写入到特定名称的文件,eg:python -f txt_result txt,否则将结果打印在控制台
3.在指定要查找的特定扩展名文件后,指定查找的根目录,eg:python find_file.py txt /
"""
import sys
import os