This file contains hidden or 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
# BEGIN GZIP | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | |
</ifmodule> | |
# END GZIP | |
RewriteEngine On | |
# Some hosts may require you to use the `RewriteBase` directive. | |
# If you need to use the `RewriteBase` directive, it should be the |
This file contains hidden or 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
jQuery.event.special.tap = { | |
add: function(handleObj){ | |
var $this = $(this); | |
var touchMoved = false; | |
var touched = false; | |
var touchesHandler = function(e){ | |
if(e.type === 'touchstart'){ | |
touchMoved = false; | |
touched = true; | |
}else if(e.type === 'touchmove'){ |
This file contains hidden or 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 3 grid inception | |
@mixin new-grid($class, $columns, $grid-gutter-width: $grid-gutter-width){ | |
$i: 1; | |
$grid-columns: $columns; | |
@include make-grid-columns($i: 1, $list: ".col-#{$class}-xs-#{$i}, .col-#{$class}-sm-#{$i}, .col-#{$class}-md-#{$i}, .col-#{$class}-lg-#{$i}"); | |
@include make-grid(#{$class}-xs); | |
@media (min-width: $screen-sm-min) { | |
@include make-grid(#{$class}-sm); | |
} |
This file contains hidden or 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
AddEncoding gzip .gz | |
RewriteEngine on | |
RewriteCond %{HTTP:Accept-encoding} gzip | |
RewriteCond %{HTTP_USER_AGENT} !Konqueror | |
RewriteCond %{REQUEST_FILENAME}.gz -f | |
RewriteRule ^(.*)\.css$ $1.css.gz [QSA,L] | |
RewriteRule ^(.*)\.js$ $1.js.gz [QSA,L] | |
RewriteRule ^(.*)\.html$ $1.html.gz [QSA,L] |
This file contains hidden or 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
/* Extra small devices (phones, less than 768px) */ | |
/* No media query since this is the default in Bootstrap */ | |
/* Small devices (tablets, 768px and up) */ | |
@media (min-width: $screen-sm-min) { ... } | |
/* Medium devices (desktops, 992px and up) */ | |
@media (min-width: $screen-md-min) { ... } | |
/* Large devices (large desktops, 1200px and up) */ |
This file contains hidden or 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
import codecs | |
from bs4 import BeautifulSoup | |
soup_all = BeautifulSoup(open('Wordpress_all_content.xml')) | |
soup_all_items = soup_all.find_all('item') | |
soup_posts = BeautifulSoup(open('Wordpress_selective_content.xml')) | |
soup_posts_items = soup_posts.channel.find_all('item') | |
def match_post(item): |
This file contains hidden or 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 lang="en"> | |
<body class="container"> | |
<h1>Some Title</h1> | |
<% if (names.length) { %> | |
<ul> | |
<% names.forEach(function(name){ %> | |
<li><%= name %></li> |
This file contains hidden or 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
%YAML 1.2 | |
--- | |
# See http://www.sublimetext.com/docs/3/syntax.html | |
name: JavaScript NG | |
file_extensions: | |
- js | |
- ng.js | |
scope: source.js.ng | |
contexts: | |
main: |
This file contains hidden or 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
jQuery.event.special.outsideclick = { | |
setup: function(data, namespaces, handler){ | |
var $this = $(this); | |
var namespace = namespaces.join('.'); | |
function _clickHandler(e){ | |
var handleClick = true; | |
var mouseUsed = 'button' in e; | |
if(namespace === 'mouse' && !mouseUsed){ | |
handleClick = false; |
This file contains hidden or 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
site(){ | |
cd ~/Sites/$1 | |
} | |
_site() | |
{ | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=( $(compgen -W "$(ls ~/Sites/)" -- $cur) ) | |
} | |
complete -F _site site |