Skip to content

Instantly share code, notes, and snippets.

View ligurio's full-sized avatar
💥

Sergey Bronnikov ligurio

💥
View GitHub Profile
@whot
whot / replydiff.vim
Created April 10, 2014 05:36
vim syntax file for replying to patches/diffs
" Vim syntas file for diffs in an email reply:
" Unmodified diff.vim, all the matches simply have a "> " prepended.
"
" Vim syntax file
" Language: Diff (context or unified)
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jun 20
" Quit when a (custom) syntax file was already loaded
@afresh1
afresh1 / lock_screen
Last active August 29, 2015 14:07
A set of scripts to lock my screen and turn off the laptop screen
#!/bin/sh
if ! pgrep xlock >/dev/null 2>&1; then
xlock -lockdelay 0 -endCmd ssh-add &
sleep 1
fi
sudo -k
ssh-add -D
@afresh1
afresh1 / openbsd_knf.perltidyrc
Created January 8, 2015 05:37
A perltidyrc that mostly seems to give me OpenBSD knf in my perl. While it isn't perfect it is certainly closer than what I normally use.
--indent-columns=8
--entab-leading-whitespace=8
--continuation-indentation=4
--cuddled-else
--opening-sub-brace-on-new-line
@afresh1
afresh1 / icb_twitter_bot.pl
Created February 11, 2015 02:26
An ICB bot that watches for twitter URLs and fills out the text.
#!/usr/bin/perl
use strict;
use warnings;
# On OpenBSD, I have a port for p5-Bot-ICB and p5-Net-ICB
# pkg_add p5-Bot-ICB p5-LWP-Protocol-https p5-HTML-Tree p5-Text-Unidecode
use Bot::ICB;
use LWP::Simple;
use HTML::Tree;
@pierew
pierew / .bash_aliases
Last active August 29, 2015 14:19
vzenter - A little Script to enter a openVZ CT by use Hostname
# As Bash Alias
function vzenter() {
vzctl enter $(vzlist | egrep "$1" | awk '{print $1}')
}
@etienned
etienned / csstidy
Created May 25, 2012 18:28
CLI for the PHP version of CSSTidy
#!/usr/bin/env php
<?php
/**
* CSSTidy - Command Line Interface (CLI)
*
* Command Line Interface that try to mimic as much as possible the C++ CLI
* version of csstidy. It should be a drop in replacment for the C++ CLI that is
* no longuer maintain. New settings like css_level are added.
*
* Copyright 2005, 2006, 2007 Florian Schmitz
@frbayart
frbayart / virt-manager_run.py
Created June 23, 2012 13:45
virt-manager on MACOSX
MBA-FBA:bin francois$ ./virt-manager
RuntimeWarning: tp_compare didn't return -1 or -2 for exception
RuntimeWarning: tp_compare didn't return -1 or -2 for exception
Traceback (most recent call last):
File "/Users/francois/bin/mybuild/share/virt-manager/virt-manager.py", line 393, in <module>
_show_startup_error(str(run_e), "".join(traceback.format_exc()))
File "/Users/francois/bin/mybuild/share/virt-manager/virt-manager.py", line 63, in _show_startup_error
from virtManager.error import vmmErrorDialog
File "/Users/francois/bin/mybuild/share/virt-manager/virtManager/error.py", line 173, in <module>
class _errorDialog (gtk.MessageDialog):
@mapk0y
mapk0y / runc-criiu-memo.mkd
Last active October 22, 2015 06:24
runC で CRIU をやってみる

準備

OS の準備

jessie の標準の kernel だと runc が動かない(cgroup の CPU 制御の問題)。また、CRIU を動かすにも足りないので自前で build(4.0.6)。

CRIU は github からとってきて build。buld に必要な物はすべて debian packege で補った。何が必要かは CRIU についてくる Dockerfile を見ればよい。

Ubuntu あたりを使えばもっと楽にできるかもしれない。

@bhasto
bhasto / Sony Bravia 2014.xml
Last active November 25, 2015 19:35
Plex Profile for Sony Bravia 2014
<?xml version="1.0" encoding="utf-8"?>
<Client name="Sony Bravia 2014">
<Identification>
<Header name="X-AV-Client-Info" regex=".*KDL-\d{2}[WR][5689]\d{2}B.*" />
<DeviceDescription>
<Manufacturer substring="Sony" />
<FriendlyName regex="KDL-\d{2}[WR][5689]\d{2}B.*" />
</DeviceDescription>
</Identification>
<DeviceDescription>
@paveq
paveq / gist:5608556
Last active December 17, 2015 12:19
Virtualization platform setup

Virtualization platform setup

Briefing

The host machine is Dell Vostro laptop running Fedora core 18. Centos 6.4 openVZ host will be installed on KVM VM on top of the Fedora host. OpenVZ containers will run in Centos openVZ host. The latest version (6.4) was picked due the mirrors no longer having older 6.3 version, which was not supported anymore.

Execution