This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
https://github.com/37signals/pow/issues/172#issuecomment-6803225 | |
echo "export LC_ALL=C" >> /root/.bashrc | |
source /root/.bashrc | |
# 这个是我的VPS上系统的原因 | |
wget http://nginx.org/keys/nginx_signing.key | |
sudo apt-key add nginx_signing.key | |
# 官方的要求 | |
vim /etc/apt/sources.list | |
# 偷偷安装了VIM,不为别的,好像比VI好用 | |
# 在Sources文件后面加入如下两行: | |
# deb http://nginx.org/packages/ubuntu/ precise nginx |
替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得domain_id可以用curl
curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"
获得record_id类似
curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"
require 'open-uri' | |
require 'nokogiri' | |
code = 2904 | |
doc = Nokogiri::HTML(open("http://just2.entrust.com.tw/z/zc/zca/zca_#{code}.djhtm")) | |
# 當前股價,既網頁中的收盤價 | |
doc.css('table')[2].css('tr')[1].css('td').last.inner_text.to_f |
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
# http://stackoverflow.com/questions/14972253/simpleform-default-input-class | |
# https://github.com/plataformatec/simple_form/issues/316 | |
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput |
Finally, Simple Form support Boostrap 3. 👏
But I found it still dosen't support some components in Bootstrap 3. Or may be in the future. But I can't wait, so I find a solution to support them. It was inspired by heartcombo/simple_form#531 (comment) .
This is a final solution and I used in my project.
module ProMotion | |
module Table | |
module LoadmoreClassMethods | |
def load_moreable=(val) | |
@load_moreable = val | |
end | |
def load_moreable | |
@load_moreable || false | |
end | |
def load_more_options=(val) |
This little post aims to help you to translate Objective-C Blocks into Ruby blocks. Let's start by taking a look at few examples of iOS API call where blocks are used for animations and enumeration
Im Rubymotion and MacRuby you can use all the Ruby Lambda syntaxes that are:
block = lambda { |param| ... }