Skip to content

Instantly share code, notes, and snippets.

View sanusart's full-sized avatar

Sasha Khamkov sanusart

View GitHub Profile
@sanusart
sanusart / 0-README.md
Last active August 29, 2015 14:22
Take screenshots of web sites #phantomjs #screenshot

Install phantomJs

Run:

[sudo] npm install --global phantomjs

Start

Run:

@sanusart
sanusart / season.php
Last active August 29, 2015 14:22
Get seasson with PHP #php #season #date
<?php
$summer_months = array(4,5,6,7,8,9);
if(in_array(date('n'), $summer_months)) {
$season = 'Summer';
} else {
$season = 'Winter';
}
@sanusart
sanusart / fiddle.css
Last active December 5, 2015 19:13
jsfiddle test
html {}
body {}
a {}
p {}
h1,
h2,
@sanusart
sanusart / .editorconfig
Last active August 8, 2016 07:10
editorconfig #configuration
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@sanusart
sanusart / gist:96e7bf2695683f64088a
Last active August 19, 2018 04:59 — forked from lsauer/gist:2907369
Google Chrome special pages for memory, debug, resources, profiling, downloads...

lsauer.com


Overview of all chrome:// pages.

  • List by calling chrome://about/
  • Following is a direct dump from the 'about' page for reference

List of Pages as per v20.xxx

@sanusart
sanusart / index.html
Last active December 5, 2015 18:47 — forked from anonymous/index.html
sig
<style id="jsbin-css">
#TABLE_1 {
cursor: move;
height: 82px;
text-align: left;
width: 470px;
perspective-origin: 235px 41px;
transform-origin: 235px 41px;
border-spacing: 0px 0px;
font: normal normal normal normal 16px/normal Helvetica, Arial, sans-serif;
@sanusart
sanusart / .jscsrc
Last active December 5, 2015 23:38
jscs settings #jscs #lint
{
"preset": "google",
"validateLineBreaks": "LF",
"validateIndentation": 2,
"requireCurlyBraces": true,
"requireSemicolons": true,
"maximumLineLength": false,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"validateParameterSeparator": ", ",
@sanusart
sanusart / file.js
Created March 19, 2016 17:37
Hide keyboard on iOS #iOS
// hide keyboard on iOS
document.activeElement.blur();
jQuery('input').blur();
@sanusart
sanusart / feedly.xml
Created May 7, 2016 08:15
Feedly OPML #rss #sasha #opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Sasha subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Linux" title="Linux">
<outline type="rss" text="Web Upd8 - Ubuntu / Linux blog" title="Web Upd8 - Ubuntu / Linux blog" xmlUrl="http://feeds.feedburner.com/webupd8" htmlUrl="http://www.webupd8.org/"/>
<outline type="rss" text="Arch Linux: Recent news updates" title="Arch Linux: Recent news updates" xmlUrl="http://www.archlinux.org/feeds/news" htmlUrl="https://www.archlinux.org/news/"/>
@sanusart
sanusart / String.prototype.js
Created May 14, 2016 22:29
Safe(r) String.prototype extend example #js #javascript
// String.prototype.repeat
// http://jsbin.com/sifesep/edit?js,console,output
Object.defineProperty(String.prototype, 'repeat', {
value: function debug_repeat(times, returnArray) {
var res = [];
var i = 0;
for (i; i < times; i++) {
res.push(this);
}
if (returnArray) {