原创 nginx 安裝SSL證書

一、證書準備 下載CA證書,在此我下載下來的文件是IntermediateCA.cer和ssl_certificate.cer 二、Key證書轉換 openssl pkcs12 -in domain_name_privatekey.p1

原创 Python進行MySQL數據備份:數據查詢和添加

  運行前,需要安裝MySQLdb模塊!!! sudo yum install MySQL-python   #!/usr/bin/python # -*- coding: UTF-8 -*- import MySQLdb import

原创 Spring4.x MVC responsebody 406錯誤的解決方案

Spring MVC REST 風格API升級到Spring4.x(4.1.1.RELEASE)+的時候報了406錯誤。結合網上方案,最終定位爲: 1、 <dependency> <groupId>com.fasterxml

原创 Mac 卸載GoogleSoftwareUpdate

sudo /Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/ksinstall --uninstall  

原创 Intellij IDEA 註冊激活

一、在線生成註冊碼:http://idea.iteblog.com/ 二、License server地址爲:http://idea.iteblog.com/key.php

原创 IOS升級後無法真機測試:could not locate device support files解決辦法

手機升級了10.1,可是XCode(8.0)不支持。 解決辦法是:下載SDK,放到 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Devic

原创 Unity3D與Android SDK交互

一、Android SDK準備 1、新建Android Library工程unitysdk 2、新建libs目錄,將Unity for Android的 class.jar(Unity安裝目錄裏有)複製到此。在此我這裏,重命名爲unit

原创 Android Studio中提示Cannot resolve symble R

1、build.gradle中確認已添加 compile 'com.android.support:appcompat-v7:21.0.3' 2、菜單裏Build->Clean Project 3、菜單裏Tools->Android->

原创 Mac上安裝Gradle

step1:下載 下載地址 step2:解壓 下載完解壓到任意目錄,我解壓在/usr/local/下。 step3:配置環境變量 在命令行運行以下命令   sudo vim /etc/bashrc 添加以下內容 GRADLE_HOME=

原创 Ubuntu14 搭建Squid3代理

需要一行一行復制安裝 1、apt-get install squid 2、curl https://raw.githubusercontent.com/hxchen/proxy/master/squid.conf > /etc/squi

原创 Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

Maven工程,確定已經導入了standard.jar,jstl.jar 還提示 Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/cor

原创 grep 匹配行和前後行顯示

grep 檢索顯示匹配行以及前後行 info.txt裏檢索KEY,顯示KEY的後10行。 grep -A 10 'KEY' info.txt     info.txt裏檢索KEY,顯示KEY的前10行。 grep -B 10 'KEY'

原创 MySQL生成隨機時間

  隨機生成2014/05/01到現在的時間 SELECT FROM_UNIXTIME(UNIX_TIMESTAMP('20140501000000') + ROUND(RAND()*(UNIX_TIMESTAMP() - UNIX_

原创 redis 批量刪除數據

redis在cli裏不能直接操作。批量刪除gameRankData_DGJD開始的keys需要: ./redis-cli -n 0 keys "gameRankData_DGJD*"|xargs ./redis-cli -n 0 del

原创 excel數據導入mysql數據庫

1、excel另存爲txt。       選中將要導出的數據列,然後另存爲選擇其它格式=>文本文件(製表符分割)。       存爲: E:\項目\fblike\game_code_san.txt   2、txt導入到mysql數據庫。