Skip to content

Instantly share code, notes, and snippets.

View Orfeous's full-sized avatar
💭
I may be slow to respond.

Gabor Racz Orfeous

💭
I may be slow to respond.
  • R.S. Ltd
  • Dublin
View GitHub Profile

Keybase proof

I hereby claim:

  • I am Orfeous on github.
  • I am orfeous (https://keybase.io/orfeous) on keybase.
  • I have a public key whose fingerprint is 3AEE 4584 86CA CDDE 9418 F34F C23A 2035 0078 22E1

To claim this, I am signing this object:

@Orfeous
Orfeous / index.php
Created August 12, 2016 09:58 — forked from ziadoz/index.php
Simple PHP / jQuery CSRF Protection
<?php
// See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html
// Start a session (which should use cookies over HTTP only).
session_start();
// Create a new CSRF token.
if (! isset($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32));
}
@Orfeous
Orfeous / XSSRequestWrapper.java
Created December 11, 2015 13:00 — forked from madoke/XSSRequestWrapper.java
Stronger Anti Cross-Site Scripting (XSS) Filter for Java Web Apps
package pt.impresa.iweb.filters.request;
import java.io.IOException;
import java.text.Normalizer;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
@Orfeous
Orfeous / install-mapnik-amazon-ami.sh
Last active August 29, 2015 14:27 — forked from springmeyer/install-mapnik-amazon-ami.sh
Mapnik on Amazon Linux AMI (Fedora)
# http://aws.amazon.com/amazon-linux-ami/
# http://aws.amazon.com/amazon-linux-ami/faqs/
# Boot up a machine with at least 1.5 to 2 GB Ram
# login
chmod 600 key.pem
ssh -i key.pem ec2-user@ec2...compute.amazonaws.com
# update