Skip to content

Instantly share code, notes, and snippets.

@aegypius
aegypius / roman_to_number.go
Last active May 24, 2023 15:29
Roman To Number
func romanToInt(s string) int {
var result int
var last byte
romanToIntMap := map[byte]int{
'I': 1,
'V': 5,
'X': 10,
'L': 50,
'C': 100,
'D': 500,
@aegypius
aegypius / keybase.md
Created September 26, 2018 03:59
keybase.md

Keybase proof

I hereby claim:

  • I am aegypius on github.
  • I am aegypius (https://keybase.io/aegypius) on keybase.
  • I have a public key ASD9ZzTNiS-aytBjEDhxmEPq4ABVyINkztlLIVFWjnBPsgo

To claim this, I am signing this object:

@aegypius
aegypius / bootstrap.bash
Last active March 30, 2016 15:32
Boostrap Home directory
#!/bin/bash
#
# Boostrap home directory using a bash one-liner :
#
# bash <(curl -sL https://gist.githubusercontent.com/aegypius/ef7f5483c64aa13947e8ef972d4eed87/raw/bootstrap.bash)
#
# Ensure git is installed if not install it (support debian or gentoo for now)
( \
(type git > /dev/null 2>&1) || \
@aegypius
aegypius / smb.conf
Created May 21, 2014 09:01
Speeding up Git on a Samba share
# Add this line to the server config
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
@aegypius
aegypius / FontAwesome-v4.0.0.zip
Last active December 26, 2015 09:58
FontAwesome Iconset Generator for Zooper Widget Pro
@aegypius
aegypius / UUID.php
Created January 23, 2012 17:27 — forked from dahnielson/UUID.php
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4211 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@aegypius
aegypius / svn-authors
Created November 24, 2011 14:26
Git - SVN Clone Toolkit
git svn clone -A svn-authors -s svn://server/repository
git for-each-ref refs/remotes/tags --shell --format="r=%(refname:short) t=\${r#tags/}" | while read e; do eval "$e"; git tag -f $t refs/remotes/$r; git branch -d -r $r; done
@aegypius
aegypius / _config.yml
Created October 29, 2011 13:07
Testing Highlighting
pygments: true
markdown: redcarpet
redcarpet:
extensions: [:smart, :fenced_code, :gh_blockcode]
@aegypius
aegypius / base62.php
Created April 30, 2010 12:36 — forked from rduarte/base62.php
Base62 Encoding/Decoding
<?php
function base62_encode($num){
$chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$base = 62;
$result = '';
while($num >= $base) {
$r = $num%$base;
$result = $chars[$r].$result;
$num = $num/$base;