Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Jeffery Zhang JefferyZh

🎯
Focusing
Block or report user

Report or block JefferyZh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JefferyZh
JefferyZh / TextFileEncodingDetector.cs
Created Jul 4, 2016 — forked from TaoK/TextFileEncodingDetector.cs
Simple class to automatically detect text file encoding, with English-biased "best guess" heuristic based on byte patterns in the absence of BOM.
View TextFileEncodingDetector.cs
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
namespace KlerksSoft
{
public static class TextFileEncodingDetector
{
/*
View kestrel_service.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: <SERVICE_NAME>
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Script to run asp.net 5 application in background
### END INIT INFO
@JefferyZh
JefferyZh / README.md
Created Jan 19, 2016 — forked from mariotaku/README.md
删除当前屏幕所有微博
View README.md

删除所有微博

在Chrome Dev Tools中粘贴代码到Console,就可以删除当前屏幕所有微博。经过测试一万条微博大约需要10小时的半人工操作。

每批删除大概一分钟,最多50条。

如果遇到微博的Rate limit(提示操作过快),稍等三五分钟再试即可。

@JefferyZh
JefferyZh / README-zh-cn.md
Last active Jan 5, 2016 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet
View README-zh-cn.md

项目名称

TODO:来点项目描述

安装

TODO:说说项目要怎么安装

使用

@JefferyZh
JefferyZh / gist:003fcc07137dd1829294
Created Nov 24, 2015 — forked from philc/gist:e849b48e6c5f32592d62
A script to copy Chrome's search engine settings into Vimium's settings format
View gist:003fcc07137dd1829294
#!/bin/sh
# This script lists user defined search engines in Chromium.
# It replaces {inputEncoding}, which appears in some search engine definitions, with
# UTF-8, {google:baseURL} with the Google URL, and omits other such tokens.
# Location of Chromium's 'Web Data' SQLite3 file
CHROMIUM_WEB_DATA="$HOME/.config/chromium/Default/Web Data"
# Location to create temporary copy of 'Web Data', since the database is locked while
View python-interview.md

What is Python? State some programming language features of Python.

Python is a modern powerful interpreted language with objects, modules, threads, exceptions, and automatic memory managements. Python was introduced to the world in the year 1991 by Guido van Rossum Salient features of Python are

  • Simple & Easy: Python is simple language & easy to learn.
  • Free/open source: it means everybody can use python without purchasing license.
  • High level language: when coding in Python one need not worry about low-level details.
  • Portable: Python codes are Machine & platform independent.
  • Extensible: Python program supports usage of C/ C++ codes.
View toJSON.js
$.fn.toJSO = function () {
var obj = {},
$kids = $(this).children('[name]');
if (!$kids.length) {
return $(this).val();
}
$kids.each(function () {
var $el = $(this),
name = $el.attr('name');
if ($el.siblings("[name=" + name + "]").length) {
You can’t perform that action at this time.