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 / fibonacci.asm
Created July 19, 2010 14:06
Fibonacci n-th number (modulo 2^32) in x86 assembler
; Fibonacci n-th number (modulo 2^32)
;
; input:
; ecx = n
; modifies:
; eax, ecx, edx
; ouput:
; eax = number
; size:
; 15 bytes
/* SPDX-License-Identifier: MIT */
/*
* Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
*
***** Description ************************************************************
*
* Simple (and incomplete) syscalls interposition for accessing fixed-size Sun
* xVM VirtualBox Virtual Disk Images (.vdi files), especially using sfdisk.
*
***** License ****************************************************************
#!/bin/bash
# SPDX-License-Identifier: MIT
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Lockable script boilerplate
@przemoc
przemoc / validations.rb
Last active February 6, 2018 14:29
Validation of IBAN, ISBN, ISSN, UESRP, NER and VATIN numbers
# SPDX-License-Identifier: MIT
## Copyright (C) 2010 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
module Validations # version 0.1
# International Bank Account Number
def iban?
#include <stdio.h>
#include <stdlib.h>
#define NUMBER 12345678901234567890
#define _Q(n) #n
#define Q(n) _Q(n)
#define ATOL(n) atol(Q(n))
#define SSCANF(n) ({ long val = 0; sscanf(Q(n), "%ld", &val); val; })
@przemoc
przemoc / p7zip-pwd-from-stdin.patch
Created January 10, 2011 00:34
Awful p7zip hack for reading passwords from stdin. Compatible w/ 9.04 and 9.13.
--- p7zip_9.04.orig/CPP/7zip/UI/Console/Main.cpp 2009-06-27 16:18:14.000000000 +0200
+++ p7zip_9.04/CPP/7zip/UI/Console/Main.cpp 2011-01-10 01:25:36.000000000 +0100
@@ -48,6 +48,10 @@
#include "myPrivate.h"
#include "Windows/System.h"
+#include <iostream>
+
+#define MAX_PWD_SIZE_FROM_STDIN 1024
+
@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
#
@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 / 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 / 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]
#