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
downloadImages() | |
function downloadImages () { | |
var nextBtn = document.querySelector('.sm-gallery-image-pagination [data-value="right"]') | |
var current = -1 | |
var total = 0 | |
download(function () { | |
var index = document.querySelector('.sm-gallery-image-totals').textContent.split('/') | |
current = parseInt(index[0], 10) |
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
function spy() { | |
var called = false | |
, args = null | |
function spyFn() { | |
called = true | |
args = Array.prototype.slice.call(arguments) | |
} | |
spyFn.calledWith = function calledWith() { |
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
Show hidden characters
{ | |
"atomic_save": false, | |
"color_scheme": "Packages/User/darkula (SL).tmTheme", | |
"default_line_ending": "unix", | |
"dictionary": "Packages/Language - English/en_GB.dic", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 13, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": |
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> | |
<head> | |
<meta charset="utf-8"> | |
<title>test</title> | |
<link href="bootstrap/css/bootstrap.css" rel="stylesheet"> | |
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> | |
<style> |
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
Here is a simple jQuery plugin to make a table header fixed on top when window is scrolled. | |
Using the code from twitter bootstrap documentation page, this code is customized for table header. | |
Create the table with following layout - | |
<table class="table-fixed-header"> | |
<thead class="header"> | |
<tr> | |
<th>Column 1</th> | |
<th>Column 2</th> | |
<th>Column 3</th> |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("news.ycombinator.com") { | |
td[bgcolor="#ff6600"] { | |
background-color: #efefef !important; | |
border-radius: 4px; | |
} | |
a[href="news"] { |
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
sudo apt-get install dkms build-essential |
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
require 'rubygems' | |
require 'rest_client' | |
sources = "sources" | |
output = "scripts.min.js" | |
output_path = (File.expand_path(File.dirname(__FILE__))) + "/" + output | |
sources_path = (File.expand_path(File.dirname(__FILE__))) + "/" + sources | |
# TODO: only open file if no errors, maybe save a tmp file, then copy it over the real one? |