Skip to content

Instantly share code, notes, and snippets.

@pypykim
pypykim / ftp.bat
Created June 2, 2014 14:27
ftp.bat
@echo off
echo PLEASE WAIT...
mkdir d:\test
echo ftpuser> d:\test\temp.ftp
echo 123456>> d:\test\temp.ftp
echo lcd d:\test>> d:\test\temp.ftp
echo get test.zip>> d:\test\temp.ftp
echo bye>> d:\test\temp.ftp
ftp -s:d:\test\temp.ftp 172.31.10.194 > d:\test\output.txt
@pypykim
pypykim / sublime.g++.py.plugin
Created May 31, 2014 15:33
sublime.g++.py.plugin
import sublime, sublime_plugin
import os, subprocess
class ExecCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.run_command("save")
fileName = self.view.file_name()
fname = fileName.encode("gbk")
if fileName.endswith(".py"):
@pypykim
pypykim / tomato_dns
Created May 27, 2014 14:34
tomato_dns
server=/.google.com/192.168.1.36#1053
server=/.youtube.com/192.168.1.36#1053
server=/.facebook.com/192.168.1.36#1053
server=/.ytimg.com/192.168.1.36#1053
server=/.ggpht.com/192.168.1.36#1053
server=/.googlevideo.com/192.168.1.36#1053
server=/.twitter.com/192.168.1.36#1053
server=/.blogger.com/192.168.1.36#1053
server=/.appspot.com/192.168.1.36#1053
server=/.android.com/192.168.1.36#1053
using System;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using System.Globalization;
using System.Reflection;
using Selenium;
using Selenium.Internal;
@pypykim
pypykim / createDict1.py
Created May 15, 2014 05:47
createDict1.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import globalHandler
import pyDescription
class __glabal__(self):
def __begin__(self):
pass
@pypykim
pypykim / seleniumbacked.py
Created May 14, 2014 12:44
seleniumbacked.py
# -*- coding: utf-8 -*-
import sys
import time
# include your version of selenium webdriver in archive
sys.path.insert(0, 'selenium-2.18.zip')
import logging
from selenium import *
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.common.by import By
@pypykim
pypykim / loadConfig.py
Created May 14, 2014 12:19
loadConfig.py
# Embedded file name: E:\Source_Code\Fun\Develop\AutoTestToolBox\AutoTestToolBox\loadConfig.py
"""
Created on 2013-9-2
@author: Alex
"""
import inspect
from globalHandler import globalHandler
from globalStatic import globalStatic
from pyFile import pyFile
import win32api, win32con, sys
import globalHandler
class autoReg(object):
def __init__(self):
pass
def modifyReg(self, key, keyPath, valueName, valueType, value):
try:
@pypykim
pypykim / gist:10476417
Last active August 29, 2015 13:59
tomato.sh
#########################################################################
# File Name: route.sh
# Author: Kim Kong
# mail: kongqingzhang@gmail.com
# Created Time: 1/12 10:51:14 2014
#########################################################################
#!/bin/sh
sleep 20
wan1_if=ppp0
wan1_ip=$(ifconfig ppp0 | grep "inet addr" | cut -d":" -f2 | cut -d" " -f1)

install php

with mysql pgsql intl support

$ brew install php --with-apache --with-mysql --with-pgsql --with-intl

set php timezone in php ini

date.timezone = Europe/Vienna