Skip to content

Instantly share code, notes, and snippets.

View Zorgatone's full-sized avatar

Tommaso Ricci Zorgatone

  • BrainQuark di Tommaso Ricci
  • Turin, Italy
  • 04:41 (UTC +01:00)
  • LinkedIn in/zorgatone
View GitHub Profile
@mlugg
mlugg / StacklessEventLoop.zig
Last active September 11, 2025 19:58
Theoretical implementation of parts of `std.Io` in Zig based on #23446
gpa: Allocator,
/// I don't know how io_uring works, so my usage here is going to be total bollocks.
/// I'm going to never init this, and I'll write:
/// ```
/// io_uring.pushSqe(.{
/// .op = .sleep,
/// .arg0 = clockid,
/// .arg1 = std.time.ns_per_s,
/// .user = ptr,
/// });
@AndreyArthur
AndreyArthur / strings.zig
Created May 11, 2024 20:03
Zig strings beginner cheat-sheet.
// When I was starting to learn Zig, strings were such a pain in the ass, so I
// made this little guide for you to understand better what each type of string
// does and why some of them seems to be "wrong".
//
// I will assume that you already know how pointers, const, var, comptime and
// the stack works. You don't need to be an expert, but I will not waste time
// detailing these concepts.
//
// Sorry for the English mistakes, I'm far from being a fluent English speaker,
// but what counts is the information.

Robocop (GB) - Title Theme - #chiptrack

Play this song

  • In the Chiptrack Web Player.
  • In the desktop version from a command line prompt:
    chiptrack https://gist.github.com/jturcotte/3adba9f9cddaf60ad1cacf41027b10a5
@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
@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
@digitalhydra
digitalhydra / hexagon.scss
Created April 14, 2015 12:48
css hexagon
.hex:before {
content: " ";
width: 0; height: 0;
border-bottom: 30px solid #6C6;
border-left: 52px solid transparent;
border-right: 52px solid transparent;
position: absolute;
top: -30px;
}
@marcocarnazzo
marcocarnazzo / 030_update_platform_config.js
Last active May 31, 2019 15:31
Ionic/Cordova update platform config
#!/usr/bin/env node
/** This hook updates platform configuration files based on preferences and config-file data defined in config.xml.
Currently only the AndroidManifest.xml and IOS *-Info.plist file are supported.
See http://stackoverflow.com/questions/28198983/ionic-cordova-add-intent-filter-using-config-xml
Preferences:
1. Preferences defined outside of the platform element will apply to all platforms
2. Preferences defined inside a platform element will apply only to the specified platform
@morganrallen
morganrallen / _README.md
Last active January 15, 2023 19:41
Janky Browser

JankyBrowser

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

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

Local Install

$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@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;
@lox
lox / Makefile
Last active March 28, 2018 12:55
Replaced Grunt/Gulp with a Makefile
SASSC = sass --style compact
COMPSDIR = resources/assets/components
SASSDIR = resources/assets/css
JSDIR = resources/assets/js
DISTDIR = web/dist
CSSDIR = $(DISTDIR)/css
SASSINC = $(SASSDIR) \
$(COMPSDIR)/asimov/src/scss \
$(COMPSDIR)/asimov-contests/src/scss \
$(COMPSDIR)/asimovicons/src/scss