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
attr_accessor :attachment64 | |
before_validation :save_attachment64 | |
has_attached_file :attachment, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/aws.yml", | |
:path => "messages_images/:id/:style/:filename", | |
:styles => { :original => ['1000x600>'], | |
:normal => ['500x500>'], | |
:stack => ['137x133>'] | |
}, |
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/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
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
/** | |
* cache script and css to localStorage (same domain only) | |
* | |
* $CLS.style("a.css"); | |
* | |
* $CLS.script("jquery-1.5.2.min.js").wait() | |
* .script("a.js") | |
* .script("b.js") | |
* .script("c.js") | |
* .wait(function() { |
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
# -*- encoding: utf-8 -*- | |
# author: binux<[email protected]> | |
import re | |
import time | |
import json | |
import requests | |
class BaiduFanYiAPI(object): | |
""" |
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
2139 ℹ INFORMATION SOURCE | |
23EB ⏫ BLACK UP-POINTING DOUBLE TRIANGLE | |
23EC ⏬ BLACK DOWN-POINTING DOUBLE TRIANGLE | |
23F0 ⏰ ALARM CLOCK | |
23F3 ⏳ HOURGLASS WITH FLOWING SAND | |
26C5 ⛅ SUN BEHIND CLOUD | |
26D4 ⛔ NO ENTRY | |
2705 ✅ WHITE HEAVY CHECK MARK | |
2753 ❓ BLACK QUESTION MARK ORNAMENT | |
2757 ❗ HEAVY EXCLAMATION MARK SYMBOL |
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
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
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
; Enable Zend OPcache extension module | |
zend_extension=opcache.so | |
; Determines if Zend OPCache is enabled | |
opcache.enable=1 | |
; Determines if Zend OPCache is enabled for the CLI version of PHP | |
;opcache.enable_cli=0 | |
; The OPcache shared memory storage size. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>数据加载中,请稍等...</title> | |
<script language="javascript">window.onerror = function(){return true;}</script> | |
<!-- <script type="text/javascript" src="./jquery.js"></script> --> | |
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script> | |
<style type="text/css"> | |
#show{width:400px; height: 50px; padding: 10px; border: 8px solid #E8E9F7; background-color: white; text-align:center; line-height:50px; vertical-align:middle; overflow:hidden; font-size:16px; margin:0 auto} |