Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
// ==UserScript== | |
// @name compareFromCommit | |
// @namespace http://buznik.net/ | |
// @version 0.1.1 | |
// @description The script inserts a link to compare commits from the current commit in Github pull-request | |
// @author Alex Buznik | |
// @include /https:\/\/github.com\/(.*[^/])\/(.*[^/])\/pull\/(.*)/ | |
// @downloadURL https://gist.githubusercontent.com/beshur/e1398ff5e741308cd29476f75d612bdd/raw/compareFromCommit-TamperMonkey.js | |
// @grant none | |
// ==/UserScript== |
describe('RequestRepeater functions', function() { | |
it('should make request and repeat it at least once', function(done) { | |
const requestRepeater = new RequestRepeater({ | |
request: MOCK_REQUEST, | |
delay: 1000 | |
}) | |
let times = 0; | |
requestRepeater.requestAndRepeat() | |
requestRepeater.on('result', (result, error) => { |
// ==UserScript== | |
// @name Quora Links Remover | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.1 | |
// @description try to read Quora again! | |
// @author Alex Buznik | |
// @match https://www.quora.com/ | |
// @grant none | |
// ==/UserScript== |
// Task configurations | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('manifest.json'), | |
bumpup: { | |
options: { | |
updateProps: { | |
pkg: 'manifest.json' | |
} | |
}, |
#!/bin/bash | |
# Recursive file convertion windows-1251 --> utf-8 | |
# Place this file in the root of your site, add execute permission and run | |
# Converts *.php, *.html, *.css, *.js files. | |
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command | |
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | | |
while read file | |
do |
// Simple HSB to HSL converter by Alexander Futekov (@futekov) | |
// http://www.sitepoint.com/hsb-colors-with-sass/ | |
// | |
@function hsb($h-hsb, $s-hsb, $b-hsb, $a: 1) { | |
@if $b-hsb == 0 { | |
@return hsla(0, 0, 0, $a) | |
} @else { | |
$l-hsl: ($b-hsb/2) * (2 - ($s-hsb/100)); | |
$s-hsl: ($b-hsb * $s-hsb) / if($l-hsl < 50, $l-hsl * 2, 200 - $l-hsl * 2); | |
@return hsla($h-hsb, $s-hsl, $l-hsl, $a); |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
/** | |
* Debounce creates a FUNCTION that when invoked, delays invoking func for wait milliseconds since | |
* the last time it is called. | |
* | |
* Examples of where this may be useful: | |
* | |
* // Avoiding repeated costly operations while a window size is in flux | |
* jQuery(window).on('resize', debounce(calculateLayout, 150)); | |
* | |
* // Avoiding triggering an event on a double button press |
#!/bin/sh | |
cd .. | |
grunt release | |
cd build | |
echo "compressing..." | |
tar -cf portal.tgz ../* --exclude=../node_modules --exclude=../tests/node_modules --exclude=../data --exclude=../config/local.json | |
echo "deploying to server" | |
scp -r portal.tgz root@server:/root/remote-folder/ | |
echo "updating sources" | |
ssh root@server " |
.block { | |
text-align: center; | |
} | |
.spinner { | |
padding: 15px 0; | |
display: inline-block; | |
font-size: 30px; | |
font-weight: bold; | |
} |