Skip to content

Instantly share code, notes, and snippets.

View gdamjan's full-sized avatar

Дамјан Георгиевски gdamjan

View GitHub Profile
@gdamjan
gdamjan / root_skel
Last active August 29, 2015 13:56
jailed php app with uwsgi and linux namespaces
❯ tree root_skel/
root_skel/
├── dev
│   └── null
├── proc
├── srv
└── usr
└── share
└── zoneinfo
@gdamjan
gdamjan / index.php
Last active August 29, 2015 13:56
Test uwsgi harakiri and slow database queries in PHP
<?php
$SLOW_QUERY = "SELECT sleep(100)";
$pdo = new PDO('mysql:host=localhost', 'root');
$statement = $pdo->query($SLOW_QUERY);
$row = $statement->fetch();
echo "Beginning…\n";
echo $row[0];
@gdamjan
gdamjan / my-custom-theme.qtcurve
Created February 16, 2014 22:09
A backup of my QtCurve custom theme
[InactiveShadows]
Size=35
[KWin]
BorderSize=3
BorderlessMax=true
CustomShadows=true
InnerBorder=0
OpaqueBorder=false
OuterBorder=2
@gdamjan
gdamjan / init.el
Created February 27, 2014 13:53
evil + el-get emacs setup
;; ~/.emacs.d/init.el
;; install emacs 24.x and el-get
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil 'noerror)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
(goto-char (point-max))
@gdamjan
gdamjan / mm_cfg.py
Created March 2, 2014 12:16
/usr/lib/mailman/Mailman/mm_cfg.py on lists.softver.org.mk
# -*- python -*-
# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@gdamjan
gdamjan / 0-README.md
Last active August 29, 2015 13:57
systemd-networkd configs for a BeagleBaord-xM

The BeagleBoard-xM has an ethernet port connected to the usb bus and it uses the smsc95xx driver. (scratch the need for a .link file, the default is MACAddressPolicy=persistent) On all eth ports I want dhcp so for that /etc/systemd/network/dhcp-all-eth.network

@gdamjan
gdamjan / foxyproxy-onion.conf
Created March 22, 2014 20:47
exported config from foxyproxy to connect to a localy running TOR Socks5 proxy for *.onion/* urls
<?xml version="1.0" encoding="UTF-8"?>
<foxyproxy mode="patterns" selectedTabIndex="1" toolbaricon="true" toolsMenu="true" contextMenu="true" advancedMenus="false" previousMode="disabled" resetIconColors="true" useStatusBarPrefix="true" excludePatternsFromCycling="false" excludeDisabledFromCycling="false" ignoreProxyScheme="false" apiDisabled="false" proxyForVersionCheck="2062134003"><random includeDirect="false" includeDisabled="false"/><statusbar icon="true" text="false" left="options" middle="cycle" right="contextmenu" width="0"/><toolbar left="options" middle="cycle" right="contextmenu"/><logg enabled="false" maxSize="500" noURLs="false" header="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;link rel=&quot;icon&quot; href=&quot;http://getfoxyproxy.org/fa
@gdamjan
gdamjan / demo.js
Last active August 29, 2015 13:58
$scope.rows = [];
var view = couchView(URL_BASE + 'ddoc/_view/channel', {
include_docs: true,
descending: true,
limit: 100,
startkey: [$routeParams.channel, {}],
endkey: [$routeParams.channel, 0]
});
@gdamjan
gdamjan / PKGBUILD
Created April 17, 2014 17:51
PKGBUILD for mgetty-voice
# Maintainer: (epsilom) Xavier Corredor <xavier.corredor.llano (a) gmail.com>
# Contributor: Dieter Rethmeyer <Dieter@rethmeyers.de>
# Contributor: Devaev Maxim <mdevaev@gmail.com>
pkgname=mgetty-voice
pkgver=1.1.37
pkgrel=5
pkgdesc="Mgetty is a versatile program to handle all aspects of a modem under Unix. The program 'mgetty' allows you to use a modem for handling external logins, receiving faxes and using the modem as a answering machine without interfering with outgoing calls."
url="http://mgetty.greenie.net/"
#! /usr/bin/env python3
from lxml import html, etree
from lxml.html import builder as E
...
Moved to https://github.com/gdamjan/polaris-to-html