This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Copyright 1998-2010 VMware, Inc. All rights reserved. | |
# | |
# This script manages the VMware USB Arbitrator service | |
# | |
# VMWARE_INIT_INFO | |
# Load bootstrapper info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function() { | |
$('#{{ID}}').dragtable( | |
{dragHandle:'.some-handle'}, | |
{ | |
persistState: function(table) { | |
if (!window.sessionStorage) return; | |
var ss = window.sessionStorage; | |
table.el.find('th').each(function(i) { | |
if(this.id != '') {table.sortOrder[this.id]=i;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# coding: utf-8 | |
import os,socket,threading,time | |
#import traceback | |
allow_delete = False | |
local_ip = socket.gethostbyname(socket.gethostname()) | |
local_port = 8888 | |
currdir=os.path.abspath('.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import psutil | |
from subprocess import PIPE | |
CWD = "/home/tim/minecraft/" # Path to where Minecraft lives | |
JAVA_EXE = "/usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin/java" | |
MINECRAFT_JAR = "minecraft_server-1.1.jar" | |
MINECRAFT_COMMAND = "{0} -Xmx1024M -Xms1024M -jar {1} nogui".format(JAVA_EXE, MINECRAFT_JAR).split() | |
SCREEN_COMMAND = "screen -d -m -S minecraft".split() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import glob | |
import os | |
import sys | |
from PIL import Image | |
EXTS = 'jpg', 'jpeg', 'JPG', 'JPEG', 'gif', 'GIF', 'png', 'PNG' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
using System.Net; | |
namespace Lib.Common | |
{ | |
public class FtpClient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function funIsEAN(objField, strCaption,msg) { | |
objField.value = objField.value.trim(); | |
if (objField.value == "") | |
return; | |
if (/[^0-9a-zA-Z_]/i.test(objField.value)) { | |
alert(strCaption + msg); | |
objField.value = ""; | |
objField.focus(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os | |
import shutil | |
import time | |
import argparse | |
parser = argparse.ArgumentParser(description='FileKiller, help you to remove dir or path before N days ') | |
parser.add_argument('-p', action="store", dest="path") | |
parser.add_argument('-d', action="store", dest="days", type= int) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// 確認傳入的Memo前N位是否為數字,並把數值使用 out value 傳出 | |
/// </summary> | |
/// <param name="memo">被判斷的String</param> | |
/// <param name="NumOffset">前面多少位為數字</param> | |
/// <param name="value">轉出之結果</param> | |
/// <returns></returns> | |
private bool checkMemoHasNumeric(string memo, int NumOffset,out int value) | |
{ | |
string numStr = memo.Substring(0, NumOffset); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int result; | |
string memo = ....; //get memo string | |
checkMemoHasNumeric(memo,3,out result); |