Skip to content

Instantly share code, notes, and snippets.

View tajmone's full-sized avatar

Tristano Ajmone tajmone

  • Italy
View GitHub Profile
@mojavelinux
mojavelinux / multipage-html5-converter.rb
Created November 3, 2014 06:02
Multipage HTML5 converter for Asciidoctor
require 'asciidoctor'
class MultipageHtml5Converter
include Asciidoctor::Converter
include Asciidoctor::Writer
register_for 'multipage_html5'
EOL = "\n"
def initialize backend, opts
@emad-elsaid
emad-elsaid / README
Last active March 11, 2020 17:48
Simple fuzzy search algorithm similar to sublimeText
Simple fuzzy search algorithm similar to sublimeText
this is a simple algorithm to give a similar result
as SublimeText search feature, if you don't use sublimeText
i think you should just give it a shot from here :
http://www.sublimetext.com
to know more about fuzzy search you should check this wiki page:
http://en.wikipedia.org/wiki/Fuzzy_string_searching
@xtian
xtian / .editorconfig
Last active January 14, 2021 21:58
Rust .editorconfig
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*.rs]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@Prince-Mandor
Prince-Mandor / FOR modifiers.md
Last active March 28, 2021 03:16
windows batch - FOR variables modifiers, ( AKA %~dp0 )

In addition, substitution of FOR variable references has been enhanced. You can now use the following optional syntax:

%~I         - expands %I removing any surrounding quotes (")
%~fI        - expands %I to a fully qualified path name
%~dI        - expands %I to a drive letter only
%~pI        - expands %I to a path only
%~nI        - expands %I to a file name only
%~xI        - expands %I to a file extension only
%~sI        - expanded path contains short names only

%~aI - expands %I to file attributes of file

@pc035860
pc035860 / version_compare.js
Created October 12, 2015 09:10 — forked from TheDistantSea/version_compare.js
Function to compare two version strings (e.g. "1.6.1" is smaller than "1.7"). Developed in order to answer http://stackoverflow.com/a/6832721/50079.
/**
* Compares two software version numbers (e.g. "1.7.1" or "1.2b").
*
* This function was born in http://stackoverflow.com/a/6832721.
*
* @param {string} v1 The first version to be compared.
* @param {string} v2 The second version to be compared.
* @param {object} [options] Optional flags that affect comparison behavior:
* <ul>
* <li>
@sma
sma / basic.py
Created December 27, 2009 16:50
A simple BASIC interpreter that can run the old HAMURABI game
from __future__ import division
from math import trunc
from random import random
import re
TOKENS = re.compile(r'(?<=REM).*|\.?\d+|\w+\$?|[():;=+\-*/]|<[=>]?|>=?|"[^"]*"')
class Basic(object):
def __init__(self, filename):
self.tokens = []
@jibsen
jibsen / bsort32.asm
Created November 15, 2015 09:42
Bubble sort in 16 bytes of x86 assembly language
;;
;; The "worlds smallest" bubble sort (16 bytes)
;;
;; Copyright (c) 1998 by Joergen Ibsen / Jibz
;; All Rights Reserved
;;
bits 32
section .text
@forivall
forivall / gh-pandoc-LICENSE.md
Last active September 20, 2023 15:28
Github-style css for pandoc

The MIT License (MIT)

Copyright (c) 2016-2017 Emily M Klassen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@jjdelc
jjdelc / crayola.json
Created February 20, 2012 06:32
Crayola colors in JSON format
[
{
"hex": "#EFDECD",
"name": "Almond",
"rgb": "(239, 222, 205)"
},
{
"hex": "#CD9575",
"name": "Antique Brass",
"rgb": "(205, 149, 117)"
@mojavelinux
mojavelinux / include.asciidoc.txt
Last active October 24, 2023 09:06
A sample AsciiDoc file for testing Asciidoctor.
== Included Section
Look, I came from out of the [blue]#blue#!
--
I'm keepin' it open.
An 'open block', like this one, can contain other blocks.
It can also act as any other block. (TODO)