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
{ | |
"湖南省": [ | |
"湘潭大学", | |
"吉首大学", | |
"湖南大学", | |
"中南大学", | |
"湖南科技大学", | |
"长沙理工大学", | |
"湖南农业大学", | |
"中南林业科技大学", |
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
Show hidden characters
{ | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": true, | |
"color_scheme": "Monokai.sublime-color-scheme", | |
"copy_with_empty_selection": true, | |
"dictionary": "Packages/Language - English/en_US.dic", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 20, | |
"ignored_packages": | |
[ |
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
desc "update zone data" | |
task :find_bad_js => :environment do | |
JS_PATH = "/lit/app/assets/javascripts/**/*.js"; | |
Dir[JS_PATH].each do |file_name| | |
puts "\n#{file_name}" | |
puts Uglifier.compile(File.read(file_name)) | |
end | |
end |
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
Ubuntu下Git服务器安装与配置 | |
1. 安装 | |
1.1 安装Git-Core: | |
sudo apt-get install git-core | |
1.2 安装 Gitosis | |
sudo apt-get install python-setuptools | |
mkdir ~/src | |
cd ~/src | |
git clone git://eagain.net/gitosis |
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
#(1) 把timestamp和token联合; | |
# (2) 使用HMAC算法得到加密字符串(将appkey作为参数并使用SHA256 哈希方法); | |
# (3) 比较signature和得到的加密字符串。 | |
timestamp = "1398236282767" | |
token = "THd78OwTxVGjTgCYSOxr4vkCPj3oIUg1TpZgkYpjerT2zNWdPQ" | |
signature = "df5fc888e86c8032f0c6b56e91ab91ebdfdae297e7a1dd4983e2e091042c151e" | |
data = timestamp + token | |
appkey = 'bl92t6tw-55zn-h14y-uzpd-y52k7jqe5s' |
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
window.TBS ||= {} | |
Date::format = (format) -> | |
o = | |
'M+': @getMonth() + 1 | |
'd+': @getDate() | |
'h+': @getHours() | |
'm+': @getMinutes() | |
's+': @getSeconds() | |
'q+': Math.floor((@getMonth() + 3) / 3) |
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
## Gem part | |
remove_file 'Gemfile' | |
run 'touch Gemfile' | |
add_source 'https://gems.ruby-china.org' | |
gem 'rails', '~> 5.0.0', '>= 5.0.0.1' | |
gem 'puma', '~> 3.0' | |
gem 'sass-rails', '~> 5.0' | |
gem 'uglifier', '>= 1.3.0' |
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
@keyframes spin { | |
0% { | |
transform:rotate(0deg); | |
} | |
100% { | |
transform:rotate(360deg); | |
} | |
} | |
.animate-spin { |
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
attached: -> | |
$subQuestion = @$("input[name='question_ids[]']") | |
checkedLengh = @$("input[name='question_ids[]']:checked").length | |
allChecked = checkedLengh > 0 and $subQuestion.length is checkedLengh | |
@$(".question-check-all").prop("checked", allChecked) | |
checkAll: (e) -> | |
checkboxes = $('input[name="question_ids[]"]') | |
_.each checkboxes, (box) => |
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
comparator: (prev,next) -> | |
return 1 if prev.get('page_number') > next.get('page_number') | |
return -1 if prev.get('page_number') < next.get('page_number') | |
if prev.get('page_number') is next.get('page_number') | |
return prev.get('number') - next.get('number') | |
return 0 |
NewerOlder