Skip to content

Instantly share code, notes, and snippets.

View bobmagicii's full-sized avatar
🤌

Bob Magic II bobmagicii

🤌
View GitHub Profile
<?php
// php -S localhost:80 -t www www/index.php
$Root = dirname(__FILE__);
$Mime = NULL;
$File = match($_SERVER['REQUEST_URI']) {
'/' => "{$Root}/index.html",
default => "{$Root}{$_SERVER['REQUEST_URI']}"
};
<?php
$Image = new Imagick($Filename);
$Orientation = $Image->GetImageOrientation();
<?php
/*//
PS C:\Users\bob\Desktop> php .\test.php
Results For 1,000,000 Iterations
=> Test Concat: 0.294673s
=> Test Eval: 0.258425s
=> Test PrintF: 0.583331s
//*/
@bobmagicii
bobmagicii / fallout-4-fixes.md
Last active January 28, 2016 03:35
Bethesda Never Finishes Games

God Damnit Bethesda

Granted, I knew this going in because of previous experience with Bethesda titles, but as you may have found out playing Fallout 4 Bethesda has this nasty habit of never finishing titles ever since they formed their own publisher to blame for pushing out titles too early. So here is my list of completely retarded bullshit that is so obvious that they should have already had done but yet required the modding community to set straight.

AND THESE ARE THINGS THE COMMUNITY HAS FIXED WITH 0 DOCUMENTATION AND 0 TOOLS RELEASED

@bobmagicii
bobmagicii / bob-on-bass.md
Last active January 20, 2016 05:54
bob on bass

Songs I Actually Know I Can

(codes) 1 = from rocksmith 2014 stfulol 2 = if i practice really really hard i could

  • Cold Company - Minus The Bear (1)
  • Devo - Whip It (2)
  • Green Day - American Idiot
  • Green Day - Boulevard of Broken Dreams
@bobmagicii
bobmagicii / constant-arrays.php
Created December 29, 2015 19:03
constant arrays. huh.
<?php
/*
C:\Users\bob\Desktop>php test.php
int(1)
string(3) "omg"
int(2)
string(3) "wtf"
int(4)
string(3) "bbq"
<?php
class ImageEditor {
static public function
MakeImageSquare(Imagick $Image, int $Square):
Imagick {
// $Image->CropThumbnailImage($Square,$Square);
// this method has a terrible habit of breaking every 3rd release.
@bobmagicii
bobmagicii / not-an-actual-mod.psc
Last active December 17, 2015 23:02
papyrus the language of skyrim has nullable types.
Function DoSomeShit(Actor Who)
{do some shit with the specified actor. }
If(Who == None)
Who = Game.GetPlayer()
EndIf
;; ...
Return
@bobmagicii
bobmagicii / plzwait.php
Last active December 16, 2015 22:15
enter
<?php
/*
C:\Users\bob\Desktop>php plzwait.php
1450303435.52
1450303436.0004
*/
function WaitForPerigee() {
// wait until the last possible moment so that we have as much of the
<?php
public function
OnConstruct() {
$this->Get->Page(function(int $p):int {
if($p < 1) return 1;
else return $p;
});
return;