This file contains 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
# If Nginx+Laravel displays a blank page | |
# cd to Laravel root folder | |
sudo chown -R www-data:www-data . | |
sudo usermod -aG www-data $USER | |
sudo find . -type f -iwholename '*.git*' -exec chmod 664 {} \; | |
sudo find . -type d -iwholename '*.git*' -exec chmod 775 {} \; | |
sudo chgrp -R www-data storage bootstrap/cache | |
sudo chmod -R 775 storage bootstrap/cache |
This file contains 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
# Run csrutil disable on Recovery | |
sudo mkdir /System/Library/Java/JavaVirtualMachines/1.6.0.jdk | |
sudo ln -s '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents' /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents | |
sudo mkdir /System/Library/Java/Support/Deploy.bundle |
This file contains 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
#!/bin/bash | |
# frameworkpython -m IPython --matplotlib | |
# what real Python executable to use | |
PYVER=2.7 | |
PATHTOPYTHON=/usr/local/bin/ | |
PYTHON=${PATHTOPYTHON}python${PYVER} | |
# find the root of the virtualenv, it should be the parent of the dir this script is in |
This file contains 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 tiggerTouchEvent(target, type, identifier, x, y) { | |
//Firefox | |
var e = document.createEvent('TouchEvent'), | |
touch = document.createTouch(window, target, identifier), | |
touches, | |
targetTouches, | |
changedTouches; | |
if (type == 'touchend') { | |
touches = document.createTouchList(); |
This file contains 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
{"11":{"en":"Beijing","cn":"\u5317\u4eac\u5e02","citys":{"1101":{"cn":"\u5e02\u8f96\u533a\uff08\u5317\u4eac\uff09","en":"City(Beijing)"},"1102":{"cn":"\u53bf\uff08\u5317\u4eac\uff09","en":"County(Beijing)"}}},"12":{"en":"Tianjin","cn":"\u5929\u6d25\u5e02","citys":{"1201":{"en":"City(Tianjing)","cn":"\u5e02\u8f96\u533a(\u5929\u6d25)"},"1202":{"en":"County(Tianjing)","cn":"\u53bf(\u5929\u6d25)"}}},"13":{"en":"Hebei","cn":"\u6cb3\u5317\u7701","citys":{"1301":{"en":"Shijiazhuang","cn":"\u77f3\u5bb6\u5e84\u5e02"},"1302":{"en":"Tangshan","cn":"\u5510\u5c71\u5e02"},"1303":{"en":"Qinhuangdao","cn":"\u79e6\u7687\u5c9b\u5e02"},"1304":{"en":"Handan","cn":"\u90af\u90f8\u5e02"},"1305":{"en":"Xingtai","cn":"\u90a2\u53f0\u5e02"},"1306":{"en":"Baoding","cn":"\u4fdd\u5b9a\u5e02"},"1307":{"en":"Zhangjiakou","cn":"\u5f20\u5bb6\u53e3\u5e02"},"1308":{"en":"Chengde","cn":"\u627f\u5fb7\u5e02"},"1309":{"en":"Cangzhou ","cn":"\u6ca7\u5dde\u5e02"},"1310":{"en":"Langfang","cn":"\u5eca\u574a\u5e02"}}},"14":{"en":"Shanxi","cn":"\u5c71\u8 |
This file contains 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 | |
# coding: utf-8 | |
from pyxmpp.jid import JID | |
from pyxmpp.message import Message | |
from pyxmpp.jabber.client import JabberClient | |
from pyxmpp.jabber.simple import send_message | |
from pyxmpp import streamtls | |
import time |
This file contains 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
import net.sf.json.JSONObject; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.security.InvalidKeyException; | |
import java.security.KeyManagementException; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.IllegalBlockSizeException; | |
import javax.crypto.Mac; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.SecretKeySpec; |
This file contains 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
package ICTCLAS.I3S.test; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.UnsupportedEncodingException; | |
import ICTCLAS.I3S.AC.ICTCLAS50; | |
public class Test_ImportUsrDict { |
This file contains 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 | |
from .upyun import UpYun | |
class qqFileUploader(object): | |
def __init__(self, work): | |
self.work = work | |
self.allowedExtensions = [".jpg",".png",".jpeg",] | |
self.sizeLimit = 1024000 |
This file contains 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/php | |
<?php | |
require 'bootstrap.php'; | |
require_once LIBRARY_PATH.'/thrift/packages/cassandra/Cassandra.php'; | |
require_once LIBRARY_PATH.'/thrift/packages/cassandra/cassandra.Cassandra.client.php'; | |
require_once LIBRARY_PATH.'/thrift/packages/cassandra/cassandra_types.php'; | |
use cassandra\Compression; | |
$config = require 'configs/cassandra.php'; | |
$pool = new phpcassa\Connection\ConnectionPool($config['keyspace'], $config['servers']); |
NewerOlder