Skip to content

Instantly share code, notes, and snippets.

View Zorgatone's full-sized avatar

Tommaso Ricci Zorgatone

  • BrainQuark di Tommaso Ricci
  • Turin, Italy
  • 19:08 (UTC +02:00)
  • LinkedIn in/zorgatone
View GitHub Profile
@Zorgatone
Zorgatone / regexutils.js
Last active December 7, 2015 14:31
My personal collection of useful Regular Expressions for programming
/* File: regexutils.js */
/* Language: JavaScript */
/* http://scriptular.com/ */
// Match a standard email
var email = /(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/i
// Match an HTML comment
var htmlComment = /<!--((?:(?!-->).)*)-->/;
// Match the Host and page address from an URL
var urlAndHost = /^(https?):\/\/((?:[A-Z0-9]*\.?)*)((?:\/?[A-Z0-9])*)/i;
@Zorgatone
Zorgatone / ciao.bf
Created November 6, 2014 11:59
Brainfuck: Italian Hello World - prints "Hello" with CRLF line ending.
>>>++++++++
[
<++++++++
[
<+<+
>+>--
]
>-
]
<<+++. C 67
@Zorgatone
Zorgatone / .gitignore_global
Created November 24, 2014 11:31
My global git ignore
# Archives and executables #
*.jar
*.rar
*.tar
*.zip
*.exe
*.dmg
*.tar.gz
*.xz
*.tar.xz
@Zorgatone
Zorgatone / hex_colors
Last active August 29, 2015 14:10
Hex colors
#B01AFA
#5B0CC0
#5BA770
#EDA77A
#ADA71A
@Zorgatone
Zorgatone / welcome.bf
Created December 11, 2014 10:25
Prints "Hello and welcome\r\n"
>>+++++++++++++
[
<+<+
>>-
]<---> (store CR & LF)
+++[>++++++++++<-]>++ (storing space)
>+++++++[
>++++++++++
<-
]>++. (H)

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$&gt; npm install https://gist.github.com/Zorgatone/880219845674e9a132b8/download
@Zorgatone
Zorgatone / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Zorgatone
Zorgatone / CueComboBox.cs
Last active August 29, 2015 14:26
WindowsFormsCueComponents
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace Zorgatone.WindowsFormsCueComponents
{
public class CueComboBox : ComboBox
{
#region PInvoke Helpers
@Zorgatone
Zorgatone / infinity.md
Last active March 2, 2016 14:50
Roguelike Infinity - Legend

Roguelike Infinity

Legend

Evil Bosses

  • A Archon
  • B Basilisk
  • C Chimera