Skip to content

Instantly share code, notes, and snippets.

Tristano Ajmone tajmone

Block or report user

Report or block tajmone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Prince-Mandor / FOR
Last active Apr 17, 2019
windows batch - FOR variables modifiers, ( AKA %~dp0 )
View FOR

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
forivall /
Last active Oct 22, 2019
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:

MicBrain / metatags.html
Last active Dec 5, 2019
The list of useful meta tags used in HTML5 documents.
View metatags.html
<!--Recommended Meta Tags-->
<meta charset="utf-8">
<meta name="language" content="english">
<meta http-equiv="content-type" content="text/html">
<meta name="author" content=”Rafayel Mkrtchyan”>
<meta name="designer" content=”Rafayel Mkrtchyan”>
<meta name="publisher" content=”Rafayel Mkrtchyan”>
xtian / .editorconfig
Last active Nov 15, 2019
Rust .editorconfig
View .editorconfig
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
root = true
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
dsernst /
Last active Nov 27, 2019
Compare `git add .` vs `git add -A`

git add . vs git add -A

Both of these will stage all files, including new files (which git commit -a misses) and deleted files.

The difference is that git add -A also stages files in higher directories that still belong to the same git repository. Here's an example:

jibsen / bsort32.asm
Created Nov 15, 2015
Bubble sort in 16 bytes of x86 assembly language
View bsort32.asm
;; The "worlds smallest" bubble sort (16 bytes)
;; Copyright (c) 1998 by Joergen Ibsen / Jibz
;; All Rights Reserved
bits 32
section .text
pc035860 / version_compare.js
Created Oct 12, 2015 — 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
View version_compare.js
* Compares two software version numbers (e.g. "1.7.1" or "1.2b").
* This function was born in
* @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>
miy4 / create-custom-css.bash
Last active Dec 1, 2016
Pandoc HTML Template (Github Style)
View create-custom-css.bash
#!/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
exit 1
mojavelinux / multipage-html5-converter.rb
Created Nov 3, 2014
Multipage HTML5 converter for Asciidoctor
View multipage-html5-converter.rb
require 'asciidoctor'
class MultipageHtml5Converter
include Asciidoctor::Converter
include Asciidoctor::Writer
register_for 'multipage_html5'
EOL = "\n"
def initialize backend, opts
Chaser324 /
Last active Dec 6, 2019
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

You can’t perform that action at this time.