Skip to content

Instantly share code, notes, and snippets.

<?php
echo CHtml::link('Выбор языка <span class="fa fa-angle-down"></span>', '#', [
'id' => 'select-lang-link',
'data-toggle' => 'dropdown',
]);
$onclick = "
var p = $(this).parent();
p.siblings().removeClass('active');
@sarkian
sarkian / mkshot
Created March 10, 2015 18:34
mkshot
#!/bin/bash
fname=~/images/screenshots/screen_$(date +%F_%H-%M-%S).png
case $1 in
full)
# scrot $fname
import -window root $fname
;;
select)
@sarkian
sarkian / dwb vim-like insert mode
Created August 20, 2014 23:38
Userscript for dwb browser that adds vim-like shortcuts in insert mode
//!javascript
function dispatchEvents(events, command, cm) {
var mode = util.getMode();
if(mode == Modes.InsertMode || (cm && mode == Modes.CommandMode))
events.forEach(function(e) {
util.dispatchEvent(e);
});
else if(command)
@sarkian
sarkian / Road Rash (1994) (3DO) wine launcher. Fixes 'Could not find any CD-ROM drive' error.
Created August 10, 2014 15:29
Road Rash (1994) (3DO) wine launcher. Fixes 'Could not find any CD-ROM drive' error.
#!/bin/bash
# Road Rash (1994) (3DO) wine launcher
# Fixes 'Could not find any CD-ROM drive' error
# NOTE: ISO-image may be any valid ISO (e.g. Ubuntu Live-CD :))
# Default configuration (game and image placed in different directories)
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # path to directory with .iso (location of this script)
@sarkian
sarkian / 0001-Russian-layout-support.patch
Last active August 29, 2015 14:03
Vimperator patch for russian layout support
From 2a69668fa35981a17c0fcfb7b255e9467a970a2e Mon Sep 17 00:00:00 2001
From: Sarkian <root@dustus.org>
Date: Fri, 21 Nov 2014 15:41:31 +0300
Subject: [PATCH] Russian layout support
---
common/content/events.js | 73 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 72 insertions(+), 1 deletion(-)
diff --git a/common/content/events.js b/common/content/events.js
#!/usr/bin/env python
# -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# Copyright (C) 2010 Red Hat, Inc., John (J5) Palmieri <johnp@redhat.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.