Skip to content

Instantly share code, notes, and snippets.

View tajmone's full-sized avatar

Tristano Ajmone tajmone

  • Italy
View GitHub Profile
@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 = []
@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)"
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@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)
@rxaviers
rxaviers / gist:7360908
Last active May 8, 2024 09:30
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@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
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 2, 2024 05:49
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@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
@miy4
miy4 / create-custom-css.bash
Last active December 19, 2023 05:48
Pandoc HTML Template (Github Style)
#!/usr/bin/env bash
usage() {
cat << HEREDOC 1>&2
Usage: create-custom-css.bash [OPTION]
-d, --debug enable debug mode
-h, --help display this help and exit
HEREDOC
exit 1
@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>