Skip to content

Instantly share code, notes, and snippets.

View ekeyme's full-sized avatar

ekeyme

View GitHub Profile
#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
@ekeyme
ekeyme / gist:7e3513caddb072d7f33e0e31e3505b71
Created December 2, 2016 07:40
objdump output of my compiled C program
[ekeyme@castor tmp]$ objdump -s -j .rodata /mnt/bioinfo/ekeyme/tmp/t
/mnt/bioinfo/ekeyme/tmp/t: file format elf64-x86-64
Contents of section .rodata:
400658 01000200 00000000 00000000 00000000 ................
400668 41424344 00000000 73747220 636f6e74 ABCD....str cont
400678 656e743a 2025732c 20737472 20616464 ent: %s, str add
400688 72657373 3a202570 0a007374 725b305d ress: %p..str[0]
400698 3a202563 20616464 72657373 3a202570 : %c address: %p
@ekeyme
ekeyme / joinline.sh
Last active January 13, 2017 10:13
joining contents in line with strings
#!/usr/bin/env bash
#
# MIT license
# Author: EKEYME@GMAIL.COM
#
# joining contents in line with strings
short_usage="$(basename $0) [-h] [join_string] [left-closer [right-closer]]"
# display usage
usage() {