View gulpfile.js
var gulp = require('gulp');
var autoprefixer = require('autoprefixer-core');
var vars = require('postcss-simple-vars');
var colorFunction = require("postcss-color-function")
var $ = require('gulp-load-plugins')();
// errors handling and notify
var shitHappens = function(err) {
$.notify.onError("Error: <%= error.message %>")(err);
View cmdrc.bat
@cls
@doskey ls=ls --color $*
@doskey ..=cd ..
@doskey ...=cd ../..
@doskey ~=cd %userprofile%
@doskey e.=explorer .
@doskey hosts=subl %WINDIR%\System32\drivers\etc\hosts
@doskey ff="C:\Program Files (x86)\Mozilla Firefox\firefox.exe" $*
@doskey sudo=runas /user:User $*
@doskey new=%USERPROFILE%\new.bat $*
View winscp.nim
import os, osproc, parsecfg, streams, strutils, json, winlean
import wox, registry
var wp = newWox()
proc getSessions(): seq[string] =
result = @[]
let iniPath = joinPath(getConfigDir(), "winscp.ini")
View logos.json
[
{
"cat": "cities",
"name": "aktau.svg"
},
{
"cat": "cities",
"name": "almaty.svg"
},
{
View mozlz4a.py
#!/usr/bin/env python
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
# This file format is in fact just plain LZ4 data with a custom header (magic number [8 bytes] and
# uncompressed file size [4 bytes, little endian]).
#
# This Python 3 script requires the LZ4 bindings for Python, see: https://pypi.python.org/pypi/lz4
#
View jquery_plugins.md
View change_img_src.php
<?php
//Этот фильтр меняет ссылку на файл только на морде сайта:
function change_image_src($content) {
return preg_replace('/src="([^"]+)"/', 'src="http://src.sencha.io/sw/$1"', $content);
}
add_filter( 'the_content', 'change_image_src' );
//Этот меняет ссылку на файл при сохранении/обновлении поста:
View support.placeholde.js
$.support.placeholder = false;
test = document.createElement('input');
if('placeholder' in test) $.support.placeholder = true;
if(!$.support.placeholder) {
var active = document.activeElement;
$(':text').focus(function () {
if ($(this).attr('placeholder') != '' && $(this).val() == $(this).attr('placeholder')) {
$(this).val('').removeClass('hasPlaceholder');
}