Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# by Matt Harzewski | |
# Read more: http://www.webmaster-source.com/2013/09/25/finding-a-websites-favicon-with-ruby/ | |
require "httparty" | |
require "nokogiri" | |
require "base64" | |
class Favicon |
def select2 text, options | |
page.find("#s2id_#{options[:from]} a").click | |
find(:xpath, "//body").find("input.select2-input").set(text) | |
page.execute_script(%|$("input.select2-input:visible").keyup();|) | |
find(:xpath, '//body').find('ul.select2-results li', text: text).click | |
end |
require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
require 'mina/rvm' | |
# Usually mina focuses on deploying to one host and the deploy options are therefore simple. | |
# In our case, there is a number of possible servers to deploy to, it is therefore necessary to | |
# specify the host that we are targeting. | |
server = ENV['server'] | |
# Since the same host can have multiple applications running in parallel, it is necessary to |
# spec/support/capybara/select2_helper.rb or features/support/select2_helper.rb | |
module Select2Helper | |
# @example | |
# select2 "Item", from: "select_id" | |
# select2 /^Item/, from: "select_id" | |
# | |
# @note Works with Select2 version 3.4.1. | |
def select2(text, options) | |
find("#s2id_#{options[:from]}").click |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<!-- Locale switchers, but presents all available locales as options, even the presently active one --> | |
<ul> | |
<% Refinery::I18n.config.frontend_locales.each do |locale| %> | |
<li> | |
<%= link_to "/#{locale.to_s + request.path}", {:title => Refinery::I18n.locales[locale]} do%> | |
<span><%= Refinery::I18n.locales[locale] %></span> | |
<% end -%> | |
</li> | |
<% end %> |
<?php | |
/** | |
* Open Graph protocol for WordPress | |
* @version 0.9.2 | |
* @author makoto_kw | |
* @link https://gist.github.com/3399585 | |
*/ | |
// key into custom fields for description. Default is for All in One SEO Pack | |
define('WP_OGP_POST_DESCRIPTION_KEY', '_aioseop_description'); |
*.swp | |
*.swo | |
.idea | |
bitrix/components/bitrix/* | |
bitrix/php_interface/dbconn.php | |
bitrix/managed_cache/* | |
bitrix/stack_cache/* | |
bitrix/wizards/* | |
bitrix/themes/* | |
bitrix/gadgets/* |
#!/bin/bash | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <[email protected]> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |