Skip to content

Instantly share code, notes, and snippets.

@v3l0c1r4pt0r
v3l0c1r4pt0r / policy.h.patch
Created August 21, 2014 14:20
Patch adjusting uucp tools to work on Android without using configuration file
--- policy.h 2003-05-29 08:08:45.000000000 +0200
+++ policy.h.new 2014-08-20 12:03:45.595405893 +0200
@@ -297,7 +297,7 @@
systems the lock files are placed in /etc/locks. On some they are
placed in /usr/spool/locks. On the NeXT they are placed in
/usr/spool/uucp/LCK. */
-/* #define LOCKDIR "/usr/spool/uucp" */
+#define LOCKDIR "/data/local/etc/spool/uucp"
/* #define LOCKDIR "/etc/locks" */
/* #define LOCKDIR "/usr/spool/locks" */
@v3l0c1r4pt0r
v3l0c1r4pt0r / openswf.sh
Created January 26, 2015 19:59
Simple script to force Firefox to open SWF files
#!/bin/sh
#bash script to force firefox to open SWF files
if [ $# -lt 1 ];
then
echo "usage: $0 [filename]"
exit 1;
fi;
outfile="/tmp/swf.html"
if [[ $1 =~ /.* ]];
then
@v3l0c1r4pt0r
v3l0c1r4pt0r / rot13.c
Created February 21, 2015 13:23
ROT13 encoder/decoder
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int ch = '\0';
while((ch = fgetc(stdin)) != EOF)
{
/* for every char in stdin */
unsigned char c = (unsigned char)ch;
if(
@v3l0c1r4pt0r
v3l0c1r4pt0r / fontmaker.c
Last active January 1, 2016 09:39
Bitmap creator for ST7565 based displays
//#include<windows.h>
#define GLUT_DISABLE_ATEXIT_HACK
#include <GL/glut.h>
#include <stdio.h>
#include <string.h>
#define background 1, 1, 1
#define foreground 0, 0, 0
unsigned int width = 5;

Keybase proof

I hereby claim:

  • I am v3l0c1r4pt0r on github.
  • I am v3l0c1r4pt0r (https://keybase.io/v3l0c1r4pt0r) on keybase.
  • I have a public key whose fingerprint is 4461 2E7B 00AB 975E 7803 B22A DCBA 7CDE 5B11 097D

To claim this, I am signing this object:

@v3l0c1r4pt0r
v3l0c1r4pt0r / vim2html.css
Created February 19, 2018 18:02
CSS stylesheet for including with :TOhtml output
/** vim2html.css
* This file consists of full CSS needed to color every default highlighting
* group of Vim syntax on :TOhtml command output
*/
.Operator { color: #ff6060; }
/*.Ignore { color: #000000; }*/
.Error { color: #ffffff; background-color: #ff6060; padding-bottom: 1px; }
.Underlined { color: #5fd7ff; text-decoration: underline; }
.Type { color: #87ffaf; }
.Todo { color: #000000; background-color: #ffff00; padding-bottom: 1px; }
@v3l0c1r4pt0r
v3l0c1r4pt0r / colorify.vim
Created February 21, 2018 17:34
Vim script to insert ANSi escape codes
function! Icolorify(color)
normal `>a
execute "normal `<i\<C-V>\<C-[>[" . a:color . "m"
endfunction
" Foreground
command! -range CBlack call Icolorify(30)
command! -range CRed call Icolorify(31)
command! -range CGreen call Icolorify(32)
command! -range CYellow call Icolorify(33)
@v3l0c1r4pt0r
v3l0c1r4pt0r / colorme.sh
Created March 15, 2018 16:01
Make your prompt colorful
#!/bin/bash
#usage: source colorme.sh [color]
color='37'
if [ $# -ge 1 ]; then
color="$1"
fi;
export PS1="\[\033[1;${color}m\][\u@\h \W]\$ \[\033[0m\]"
@v3l0c1r4pt0r
v3l0c1r4pt0r / Win10_1709_Polish_x64.iso.hash
Created March 24, 2018 14:07
Skróty Windows 10 Fall Creators Update
MD5 93432f1acef0a47ff0eb11b988cd9bde Win10_1709_Polish_x64.iso
SHA1 567ec71d491a461dd85c75c0d1c1703de0ad0982 Win10_1709_Polish_x64.iso
SHA224 53889c6ec508a472bb870c76fcfe90a1c38318a4e3ecafdaf89d3a0a Win10_1709_Polish_x64.iso
SHA256 324f914c0267aec3edb8112a44e4104604eb0a20ab8a8ddf5e247f4ab5474c50 Win10_1709_Polish_x64.iso
SHA384 3f1c96859527086f5554dd83ffb027a31dc919309b60d3e4dc4fe8801fbb65ed4a74d57ffc862537d95f1ea8090174d8 Win10_1709_Polish_x64.iso
SHA512 2e0eec24ebd1368806b761ad1071a1ec5a2b5cc7e692d5388542f2cf4d649d48974767ead207fba09ba62f1f9d258cbd4d3008d16ead9d0270d346f49a9ed8dc Win10_1709_Polish_x64.iso
@v3l0c1r4pt0r
v3l0c1r4pt0r / gentestpage.py
Created May 23, 2018 15:58
Script for generating test pages for line printers (dot-matrix) for sake of charset identification
#!/usr/bin/env python3
# generate test page for printer
import os
a = b''
for c in range(32,256):
a +=bytes([c])
t = []
for i in range(0,16):