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
if [ -n "$INSIDE_EMACS" ]; then | |
chpwd() { print -P "\033AnSiTc %d" } | |
print -P "\033AnSiTu %n" | |
print -P "\033AnSiTc %d" | |
fi |
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
//requires lodash | |
function preload(sources, chunkSize) { | |
chunkSize = chunkSize || sources.length; | |
var sourcesChunked = _.chunk(sources, chunkSize); | |
var steps = sourcesChunked.length; | |
var current = 0; | |
var inner = function(_current){ | |
var imagesTemp = []; | |
var l = sourcesChunked[_current].length; | |
var counter = 0; |
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 requests | |
import threading | |
from bs4 import BeautifulSoup | |
from Queue import Queue | |
import re | |
import time | |
max_page = 230 | |
num_workers = 200 | |
sentence_regex = re.compile(r'([^.!?(\n)+]+[.!?]+)') |
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
//allow double box shadows | |
@mixin box-shadow($shadow1, $shadow2:false) { | |
$params: $shadow1; | |
@if $shadow2 | |
{ $params: $shadow1, $shadow2; } | |
-webkit-box-shadow: $params; | |
-moz-box-shadow: $params; | |
box-shadow: $params; | |
} |
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
//Author: Felix Descoteaux | |
//Usage: $.sameheight($("#element1"), $(".element2"), ... ); | |
(function($) { | |
var sameHeight = function sameHeight() { | |
var arrayOfHeights = [], | |
arr = Array.prototype.slice.call(arguments), | |
max; | |
//Clear any height value |
NewerOlder