Skip to content

Instantly share code, notes, and snippets.

View przemoc's full-sized avatar

Przemysław Pawełczyk przemoc

View GitHub Profile
@przemoc
przemoc / xopen.c
Last active February 6, 2018 14:52
How to open a file and create all needed directories along the way - http://stackoverflow.com/q/11147850/241521
/* SPDX-License-Identifier: MIT */
/*
* Copyright (C) 2012 Przemyslaw Pawelczyk <przemoc@gmail.com>
*
* This code is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
#include <errno.h>
#include <fcntl.h>
@przemoc
przemoc / FREEBSD-VM-URLS
Last active December 13, 2015 14:42
FreeBSD VirtualBox/VMware Images
# FreeBSD 7.1
http://virtualboxes.org/images/freebsd/
# FreeBSD 9.0 -- pre-prepared VM image for Google Code-In
http://wiki.freebsd.org/GoogleCodeIn/GettingStarted
# FreeBSD 10.1, 10.2
http://www.osboxes.org/freebsd/
# FreeBSD STABLE, CURRENT snapshot -- pre-installed VM images
@przemoc
przemoc / tmux-Stop-searching-forward-at-the-end-of-the-buffer.patch
Created February 18, 2012 23:05
Patch for tmux 1.6: Stop searching forward at the end of the buffer.
From 6bccc3fc7362967ea7d4c296a22793f7f3a2c6d8 Mon Sep 17 00:00:00 2001
From: Przemyslaw Pawelczyk <przemoc@gmail.com>
Date: Sat, 18 Feb 2012 23:51:38 +0100
Subject: [PATCH] Stop searching forward at the end of the buffer.
Requested-by: Jacobo de Vera <devel@jacobodevera.com>
---
window-copy.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
@przemoc
przemoc / almost-endless-history.sh
Created February 2, 2012 23:47
How not to lose your BASH history (and make it more compact)
# Add following lines to:
# - /etc/bash.bashrc
# - /etc/profile
export HISTSIZE=1000000
export HISTFILESIZE=$HISTSIZE
export HISTCONTROL=ignoredups
@przemoc
przemoc / rc.lua
Created February 2, 2012 23:40
My trashy awesome/rc.lua file.
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Load Debian menu entries
@przemoc
przemoc / tmux-vm.sh
Last active February 6, 2018 13:54
Set up log/debug Linux kernel session w/ QEMU in tmux
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2012 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
LDIR="$HOME/qemu"
KDIR="$LDIR/$1"
@przemoc
przemoc / gitio
Last active February 2, 2022 11:59
Turn a github.com URL into a git.io URL.
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2011 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Usage: gitio URL [CODE]
#
@przemoc
przemoc / gist:1105621
Created July 26, 2011 00:30
Blondie - Call me (Original 12 Mix) lyrics
Blondie - Call me (Original 12 Mix)
===================================
Colour me your colour baby, colour me your car
Colour me your colour darling, I know who you are
Come up off your colour chart
I know where you're coming from
Call me (call me) on the line
Call me, call me any, any time
@przemoc
przemoc / 2+3d-szablon-eps-to-pdf+jpg.sh
Last active February 6, 2018 13:17
Converting EPS w/ crop marks to PDF w/ TrimBox+CropBox and final JPEG
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2011 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Converting EPS w/ crop marks to PDF w/ TrimBox+CropBox and final JPEG
# Simple script with brief explanation
@przemoc
przemoc / siemens.gawk
Last active February 6, 2018 13:18
Siemens ringtone converter v. 0.3 // taken from pcspk 0.0.6: http://wiki.przemoc.net/projects/pcspk
#!/usr/bin/gawk -f
# SPDX-License-Identifier: GPL-2.0-only
## (C) Copyright 2007-2008 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the GNU GPL v2 only license.
## https://www.gnu.org/licenses/gpl-2.0.html
#
# Siemens ringtone converter v. 0.3
#