Skip to content

Instantly share code, notes, and snippets.

Euan euantorano

Block or report user

Report or block euantorano

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
View regex-weburl.js
//
// 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)
//
@philsturgeon
philsturgeon / 0-intro.md
Last active Jun 7, 2018
PSR-2 v CodeSniffer PSR-2
View 0-intro.md

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.

@kyledrake
kyledrake / ferengi-plan.txt
Last active Sep 26, 2018
How to throttle the FCC to dial up modem speeds on your website using Nginx
View ferengi-plan.txt
# 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 / {
@euantorano
euantorano / php_tag_fixer
Created Jul 21, 2014
Removes closing PHP tags from files which currently have one withina directory.
View php_tag_fixer
#!/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
@andrewrk
andrewrk / example.zig
Last active Jan 3, 2019
how to create a small zig file for viewing IR
View example.zig
// 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 builtin = @import("builtin");
pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn {
You can’t perform that action at this time.