Author: Lin Dong
Date: Sun Mar 8 13:36:08 PDT 2015
Lets talk about Mongo, src code
Intro
var items = []; | |
$('.history-table>ul>li>.td-likes').each(function(item) { | |
// clean spaces | |
var itemText = $(this).text().replace(/\s+/g, ' '); | |
itemText = itemText.replace(/^0\s$/g, '').split(/\s/g,2); | |
var num = parseInt(itemText); | |
if (num && !isNaN(num)) | |
items.push(num); | |
}); |
/* Отркойте | |
* https://ru.wikipedia.org/wiki/Список_районов_и_муниципальных_образований_Москвы | |
* и вставте код в отладочную консоль браузера (chrome, opera или firefox) | |
*/ | |
var areas = []; | |
$('table>tbody>tr>td:nth-child(2)>a').each(function(index){ | |
areas.push($(this).text().toLowerCase().split(' ').join('').split('-').join('')); | |
}); | |
console.log(areas); |
#!/usr/bin/python | |
import requests | |
import subprocess | |
import time, signal, logging | |
import os | |
logging.basicConfig(level=logging.INFO) | |
cur_dir = os.path.dirname(os.path.abspath(__file__)) | |
nodebb_path = os.path.join(cur_dir, 'nodebb') |
// Inject jQuery to dev console | |
var element1 = document.createElement("script");element1.src = "//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js";element1.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(element1); | |
function doScroll() | |
{ | |
$('._4gt3b').scrollTo(0,500000); | |
} | |
// начать повторы с интервалом 1,5 сек | |
var timerId = setInterval(function() { |
$('.video_item_title').toArray().reverse().forEach( | |
function(i){ | |
console.log($(i).text()) | |
}); |
Author: Lin Dong
Date: Sun Mar 8 13:36:08 PDT 2015
Lets talk about Mongo, src code
Intro
# basic pfctl control | |
# == | |
# Related: http://www.OpenBSD.org | |
# Last update: Tue Dec 28, 2004 | |
# == | |
# Note: | |
# this document is only provided as a basic overview | |
# for some common pfctl commands and is by no means | |
# a replacement for the pfctl and pf manual pages. |
/** | |
* Translucent borders | |
*/ | |
body { | |
background: url('http://csssecrets.io/images/stone-art.jpg'); | |
} | |
div { | |
border: 10px solid hsla(0,0%,100%,.5); |
// Взято из CSS фреймворка Skeleton-Sass | |
// https://github.com/WhatsNewSaes/Skeleton-Sass/blob/master/scss/base/_functions.scss | |
// | |
$total-columns: 12; // всего столбоцов (можно задавать любое, но обычно 12) | |
$column-width: 100 / $total-columns; // ширина одного столбца относительно 100% / общее количество столбцов | |
$column-margin: 4%; // расстояние между столбцами | |
// Функция расчитывает размер столбца в процентах | |
// $n - номер столбца | |
@function grid-column-width($n) { |