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 / includeTemplate.inc.php
Created April 24, 2011 14:42
Snippet to include template files from file system
<?php
# Not my own, found it here: http://modxcms.com/forums/index.php?topic=40053
# Snippet to include template files from file system
# USAGE: [[includeTemplate? &tpl=`mytemplate/template.html`]]
if ( !isset($tpl) || $tpl== "" ) return "Missing Template file!";
$tpl = $base_path . 'assets/templates/' . $tpl;
ob_start();
include($tpl);
@ixth
ixth / python_grid.py
Created May 21, 2011 15:07
GIMP plugin: Add guides according to 960px 12 column grid
#!/usr/bin/env python
from gimpfu import *
GRID_COLUMNS = 12
GRID_COLUMN_WIDTH = 80
GRID_WIDTH = GRID_COLUMNS * GRID_COLUMN_WIDTH
def python_grid(image, draw, guide_1, guide_2):
image.undo_group_start();
@ixth
ixth / xml2json.js
Created May 22, 2011 13:05
Library for xml to json conversion
/*
fuck copyrights, i just need working lib
*/
(function (global) {
function serializeNode(xmlNode) {
var jsonNode = {};
if (xmlNode.attributes) {
for (var i = 0, length = xmlNode.attributes.length; i < length; i++) {
@ixth
ixth / path_complete.lua
Created May 28, 2011 15:45
Path autocompletion script for SciTE
-- Path autocompletion script for SciTE
-- Opens autocomplete dialogue for selected path string
SCI_SUBSTITUTE_PATH = 1987
function hasbit(x, p)
return x % (p + p) >= p
end
function TrimPath(p)
if p:sub(1, 1) == '/' then p = p:sub(2) end
@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):
@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 / 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;
/* 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 / .gitignore
Created August 27, 2012 11:25
Ixth's Sublime Text 2 config
*.log
@ixth
ixth / gist:5091658
Last active December 14, 2015 13:09 — forked from gvidon/gist:5082220

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

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