Skip to content

Instantly share code, notes, and snippets.

View svenluijten's full-sized avatar

Sven Luijten svenluijten

View GitHub Profile
<?php
class Αpp {
public static function fᴏᴏ () { echo "Foo"; }
public static function foo () { echo "Bar"; }
}
<!-- 99 bottles of beer song in 251 bytes. -->
<?php for($i=99;$i>0;$i--){$b=" of beer";$s=" bottles$b";$r=" bottle$b";$w=" on the wall";$h=$i-1;echo$h>=1?"$i$s$w, $i$s.\nTake one down and pass it around, $h".($h<2?$r:$s)."$w.\n\n":"$i$r$w, $i$r. \nGo to the store and buy some more, 99$s$w.\n\n";}
@svenluijten
svenluijten / keybase.md
Created January 4, 2016 20:14
keybase.md

Keybase proof

I hereby claim:

  • I am svenluijten on github.
  • I am svenluijten (https://keybase.io/svenluijten) on keybase.
  • I have a public key whose fingerprint is F44E 66EF 5DCA 3194 4966 98C6 8D48 44F3 5252 4735

To claim this, I am signing this object:

@svenluijten
svenluijten / AuthController.php
Last active January 7, 2016 11:13
My authentication
<?php
/**
* Log a player in.
*
* @param LoginPlayerRequest $request
* @return \Illuminate\Http\Response
*/
public function auth(LoginPlayerRequest $request)
{
// The user supplied the wrong credentials.
@svenluijten
svenluijten / nginx.conf
Created January 27, 2016 13:48
Brilliant nginx config redirecting to non-www https by @jaw-sh.
server {
listen 80 default_server; # Listen for regular HTTP requests
listen [::]:80 default_server; # Handle requests over IPv6
server_name _; # Respond to any and all server_names
return 301 https://$host$request_uri; # Redirect to https
}
server {
@svenluijten
svenluijten / php.ini
Created February 17, 2016 11:20
My php.ini file
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
<?php
class Database {
// Properties:
private $host;
private $dbname;
private $user;
private $pass;
private $error;
private $stmt;
{
"bold_folder_labels": false,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/OLD/Material-Theme-Darker.tmTheme",
"detect_indentation": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
@svenluijten
svenluijten / php.ini
Created June 26, 2016 14:44
My php.ini file. Read how to install & configure PHP on Windows here:
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@svenluijten
svenluijten / _index.md
Last active June 22, 2017 11:35
Handy bash functions I commonly use

"dotfiles"

A collection of my "dotfiles" on Windows. I use this in combination with Cmder with a git bash shell.