Skip to content

Instantly share code, notes, and snippets.

View euantorano's full-sized avatar

Euan Torano euantorano

View GitHub Profile
@lattner
lattner / TaskConcurrencyManifesto.md
Last active April 25, 2024 18:22
Swift Concurrency Manifesto
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@andrewrk
andrewrk / example.zig
Last active January 1, 2020 22:27
how to create a small zig file for viewing IR
// trick #1 export a void function and put your logic here
// using std lib functions creates a lot of IR
export fn entry() void {
var x: i32 = 1;
x += 1;
}
// trick #2, override the default panic handler to something trivial
const std = @import("std");
pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace) noreturn {
@philsturgeon
philsturgeon / 0-intro.md
Last active June 7, 2018 09:34
PSR-2 v CodeSniffer PSR-2

This is a list of issues or discrepencies between the wording or intention of PSR-2 itself and the CodeSniffer PSR-2 ruleset.

Add suggestions in the comments or tweet me (@philsturgeon) if you have more inconsistencies to report.

@euantorano
euantorano / php_tag_fixer
Created July 21, 2014 13:15
Removes closing PHP tags from files which currently have one withina directory.
#!/usr/bin/python
import os, sys, re, argparse
parser = argparse.ArgumentParser(description='Fix PHP file endings')
parser.add_argument('directory', metavar='d', help='The path to the PHP sources')
args = parser.parse_args()
path = args.directory