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
@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;
@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, на случай, если шрифты уже установлены.

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

anonymous
anonymous / index.html
Created December 5, 2016 12:25
JS Bin // source https://jsbin.com/wesisamuzu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@xcooper
xcooper / install-guard-livereload.sh
Created August 20, 2013 02:53
install guard livereload on ubuntu 13.04
sudo apt-get install ruby-dev
sudo gem install rdoc
sudo gem install guard
sudo gem install guard-livereload
@constellates
constellates / gist:a76132ed7de74610a435
Last active June 16, 2017 13:25
React OAuth 2 user store with Hello.js
// dependencies ----------------------------------------------------------------------
import Reflux from 'reflux';
import Actions from '../actions/Actions';
import request from 'superagent';
import config from '../config';
let UserStore = Reflux.createStore({
// store setup -----------------------------------------------------------------------
@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();
@christocracy
christocracy / LifecycleEventLIstener.java
Last active June 24, 2022 07:38
Listening to React-Native life-cycle events in your custom Views or Modules
public class MyView extends SimpleViewManager<MapView> {
public static final String TAG = "MyView";
@Override
public String getName() {
return TAG;
}
@Override
protected MapView createViewInstance(ThemedReactContext context) {
@magician11
magician11 / write-to-firebase.js
Last active June 28, 2022 10:24
Writing data to Firebase from Node.js
const admin = require('firebase-admin');
admin.initializeApp({
credential: admin.credential.cert('./movies-387bf-firebase-adminsdk-4hoi8-c52699119b.json'),
databaseURL: 'https://movies-387bf.firebaseio.com',
});
// Get a database reference to our blog
const db = admin.database();
@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