Skip to content

Instantly share code, notes, and snippets.

View ixth's full-sized avatar
🎯
Focusing

Mikhail Menshikov ixth

🎯
Focusing
View GitHub Profile
@ixth
ixth / Белка.js
Created July 10, 2014 13:21
Белка.прячьОрехи
function Белка(орехи) {
this.орехи = [];
if (орехи.length) {
this.получиОрехи(орехи);
}
}
Белка.prototype.получиОрехи = function (орехи) {
Array.prototype.push.apply(this.орехи, орехи);
};
@ixth
ixth / gist:5612252
Created May 20, 2013 13:33
Random alphanumeric string generation
function randomChunk() {
return (Math.random() * Number.MAX_VALUE).toString(36);
}
function randomString(length) {
var result = '';
do {
var chunk = randomChunk();
var overhead = result.length + chunk.length - length;
#!/bin/sh
REPO="git://github.com/phpmyadmin/phpmyadmin.git"
DEST="pma"
VER="RELEASE_3_5_7"
DIRS=
git clone ${REPO} "${DEST}" --no-checkout -b ${VER} --depth=1
(cd "${DEST}" && git reset && git checkout ${DIRS})
function isValidDate(day) {
return !(this.earlierLimit && day < this.earlierLimit || this.laterLimit && day > this.laterLimit);
}
// O, why thou not use variables?!!
function isValidDate(day) {
var early = this.earlierLimit && day < this.earlierLimit,
late = this.laterLimit && day > this.laterLimit;
return !early && !late;
}
@ixth
ixth / gist:5091658
Last active December 14, 2015 13:09 — forked from gvidon/gist:5082220

Я: Потому что в таких документах не принято использовать отчество. Я думал уникального номера моего свидетельства будет достаточно.

ОНА: нет, не верно, отчество обязательно. а вот номер св-ва нам не нужен в таких документах

@ixth
ixth / .gitignore
Created August 27, 2012 11:25
Ixth's Sublime Text 2 config
*.log
/* Test */
.button {
position:relative;
display:inline-block;
background:lightblue;
background-image:-webkit-linear-gradient(to bottom, lightblue, lightcyan);
padding:2px 16px;
border:2px solid #ccc;
border-radius:16px;
@ixth
ixth / jquery-ui.tooltip-slider.js
Created April 16, 2012 13:16
jQuery.UI extended slider widget
(function ($) {
$.widget('ui.tooltipSlider', $.ui.slider, {
options: {
'formatTooltip': function (value) {
return value;
}
},
_create: function () {
$.ui.slider.prototype._create.apply(this, arguments);
this._formatTooltip = this.options.formatTooltip;
@ixth
ixth / SVN.py
Created January 10, 2012 09:40 — forked from danlamanna/SVN.py
Sublime Text 2 - SVN Plugin
import sublime, sublime_plugin
import os, commands
import json, re
import pprint
""" TODO:
- have settings file with username/password/additional flags?
- options menu, per file/folder commands
@ixth
ixth / timer.py
Created June 17, 2011 19:13
Simple chess clock-like app
#!/usr/bin/env python
import os
import gtk
import time
import gobject
class ChessTimer(gtk.StatusIcon):