Skip to content

Instantly share code, notes, and snippets.

View kbirmhrjn's full-sized avatar

World Warcraft kbirmhrjn

  • Aukland, Newzeland
View GitHub Profile
@kbirmhrjn
kbirmhrjn / 1-add-middleware.php
Created February 15, 2018 16:52 — forked from adamwathan/1-add-macros.php
Multiformat Endpoints in Laravel
<?php
namespace App\Http\Middleware;
class CaptureRequestExtension
{
public function handle($request, $next)
{
if ($request->route()->parameter('_extension') !== null) {
$request->attributes->set('_extension', substr($request->route()->parameter('_extension'), 1));
@kbirmhrjn
kbirmhrjn / twitter.html
Created January 2, 2018 16:22 — forked from Radostin/twitter.html
Twitter Mockup with TailwindCSS
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Twitter</title>
<link rel="stylesheet" type="text/css" href="./css/tailwind.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
@kbirmhrjn
kbirmhrjn / Sublime Text License Key
Created February 13, 2016 06:58
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.
Tags: Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version
Go to menu Help > Enter License.
----- BEGIN LICENSE -----
J2TeaM
2 User License
EA7E-940282
45CB0D8F 09100037 7D1056EB A1DDC1A2
@kbirmhrjn
kbirmhrjn / sublime_text3_crack.md
Created February 13, 2016 06:58 — forked from sublime-crack4/sublime_text3_crack.md
Sublime Text crack 3103 3083 Win64 Win32 Linux64 Linux32 OSX Mac MacOS latest

cat

To pupils: all binaries can be downloaded http://pan.baidu.com/s/1ntCChyp

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmers:

@kbirmhrjn
kbirmhrjn / NewRelicPatch.php
Created January 30, 2016 17:10 — forked from migrs/Kernel.php
newrelic patch for laravel5.2
<?php
namespace App\Http\Middleware;
use Closure;
class NewRelicPatch
{
public function handle($request, Closure $next)
{

Guide

Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is $ sudo apt-get install php-imagick, and you're done. I'll keep the guide here because a lot of it is still true for other extensions

======

I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating

Install dependencies

@kbirmhrjn
kbirmhrjn / imagick-3.4.0RC2-PHP7-forge.sh
Created January 30, 2016 07:59 — forked from pascalbaljet/imagick-3.4.0-PHP7-forge.sh
Install Imagick 3.4.0RC2 on PHP 7.0 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget http://pecl.php.net/get/imagick-3.4.0RC2.tgz
tar xvzf imagick-3.4.0RC2.tgz
@kbirmhrjn
kbirmhrjn / laravel-resources
Created October 14, 2014 02:02
Laravel Resources
Official docs
Documentation <a>http://laravel.com/docs/</a>
Laravel Ins & Outs (Community News / Laravel Weekly) <a>http://laravel.io</a>
Forums <a>http://forums.laravel.io/</a>
Wiki <a>http://wiki.laravel.io/</a>
GitHub <a>https://github.com/laravel/laravel</a>
Cheatsheet
http://cheats.jesse-obrien.ca/
//required it in global.php
Validator::extend('alpha_spaces', function($attribute, $value)
{
return preg_match('/^[\pL\s]+$/u', $value);
});
// use it as usual:
$rules = array('name' => 'required|alpha_spaces');
| PHP | 5.4 | 5.5 | Mention date | PHP version information link
+----------------------+-----+-----+--------------+------------------------------------------------------------------------
| justHost.com | X | | 2013-09-06 | https://my.justhost.com/cgi/help/447
| NetworkSolutions | X | | 2013-03-17 | http://forums.networksolutions.com/index.php?showtopic=10601&mode=linearplus
| BlueHost | X | | Today? | https://my.bluehost.com/cgi/help/php-version
| HostGator | X | X | Today | https://support.hostgator.com/articles/hosting-guide/hardware-software/what-version-of-php-are-you-using
| 1&1 | X | X | Today | http://www.1and1.com/details-php-programming
| FatCow | X | | ? | http://www.mybestwebhostingsites.com/details/fatcow-wordpress/
| Hub | X | | 2012-04-17 | http://www.webhostinghub.com/help/news/archive-announcements/php-5-4
| G