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
class AddDomain | |
def initialize(app, options={}) | |
@app = app | |
@options = options | |
end | |
def call(env) | |
status, headers, response = @app.call(env) | |
if env['PATH_INFO'].end_with?('.html') |
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
/ Partial located inside layouts folder | |
%ul | |
%li= link_to 'Link One', '/' | |
%li= link_to 'Link Two', '/' | |
%li= link_to 'Link Thr', '/' | |
%li= link_to 'Link For', '/' |
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
/ Bootstrap carousel generated from yaml file | |
/ File inside /source/layouts/ | |
- content_for :script do | |
= javascript_include_tag 'bootstrap/transition' | |
= javascript_include_tag 'bootstrap/carousel' | |
.carousel.slide{:id => "#{carousel.id}", :class => "#{carousel.id}"} | |
.carousel-inner | |
- count = 1 |
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
/ Prevent browser cache | |
%meta{:content => "max-age=0", :http => {:equiv => "cache-control"}} | |
%meta{:content => "no-cache", :http => {:equiv => "cache-control"}} | |
%meta{:content => "0", :http => {:equiv => "expires"}} | |
%meta{:content => "Tue, 01 Jan 1980 1:00:00 GMT", :http => {:equiv => "expires"}} | |
%meta{:content => "no-cache", :http => {:equiv => "pragma"}} |
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
ls -R | grep .html$ | wc -l |
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
[ | |
// BASIC COMMANDS | |
// | |
// `;;` to acts same as escape key | |
{ "keys": [";", ";"], "command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] |
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
// Project configuration | |
var project = 'bare' | |
, build = './build/' | |
, dist = './dist/' | |
, source = './src/' // 'source' instead of 'src' to avoid confusion with gulp.src | |
, lang = 'languages/' | |
, fonts = 'fonts/' | |
, bower = './bower_components/' | |
; |
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/bash | |
echo -n "Name of your theme: " | |
read -e THEME | |
git clone --depth=1 [email protected]:msnoval/bare.git $THEME | |
cd ${THEME} | |
rm -rf .git | |
ack-grep -l --print0 "'bare'" | xargs -0 -n 1 sed -i -e 's/'\''bare'\''/'\'''$THEME''\''/g' | |
ack-grep -l --print0 'bare_' | xargs -0 -n 1 sed -i -e 's/bare_/'${THEME//-/_}'_/g' | |
ack-grep -l --print0 'Text Domain: bare' ./ | xargs -0 -n 1 sed -i -e 's/Text Domain: bare/Text Domain: '$THEME'/g' |
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
{"meta":{"version":"2.5.1.2","build":1430294294},"pods":{"4":{"id":4,"name":"hotel_brand","label":"Brand","description":"","type":"taxonomy","storage":"none","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Brand","public":"1","show_ui":"1","hierarchical":"1","rewrite":"1","rewrite_with_front":"1","rewrite_hierarchical":"1","menu_location":"default","menu_position":"0","show_in_nav_menus":"1","show_tagcloud":"1","show_admin_column":"1","menu_name":"Brands","built_in_post_types_hotel":"1","built_in_post_types_news":"0"},"5":{"id":5,"name":"city","label":"Cities","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"city_hotel":{"id":6,"name":"city_hotel","label":"Hotel","description":"","help":"","class":"","type":"pick","weight":0,"pick_object":"post_type","pick_val":"hotel","sister_id":"11","required":"0","pick_format_type":"multi","pick_format_single":"dropdown","pick_format_multi":"autocomplete","pick_taggable":"0","pick_limit":"0","pick_allow_html":" |
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
{"meta":{"version":"2.5.1.2","build":1430294249},"pods":{"5":{"id":5,"name":"news_category","label":"Category","description":"","type":"taxonomy","storage":"none","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Category","public":"1","show_ui":"1","hierarchical":"1","rewrite":"1","rewrite_with_front":"1","rewrite_hierarchical":"1","built_in_post_types_news":"1","menu_name":"Categories","menu_location":"default","menu_position":"0","show_in_nav_menus":"1","show_tagcloud":"1","show_admin_column":"1","label_all_items":"All Categories","label_search_items":"Search Categories","label_popular_items":"Popular Category","label_separate_items_with_commas":"Separate category with commas","label_add_or_remove_items":"Add or remove category"},"6":{"id":6,"name":"facility","label":"Facilities","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Facility","public":"1","show_ui":"1","supports_title":"1","publicly_queryable":"1", |
OlderNewer