Skip to content

Instantly share code, notes, and snippets.

View ManojKiranA's full-sized avatar
🔍
Focusing

Manoj Kiran ManojKiranA

🔍
Focusing
  • Postiefs Technologies Private Limited
  • Coimbatore
View GitHub Profile
@shgysk8zer0
shgysk8zer0 / README.md
Created February 10, 2017 06:28
Generate random images in PHP

Generate random images in PHP

sample

Why?

  • Because you can
  • Because you have time to spare
  • Maybe you think they look cool or want to save them for wallpapers or something
  • Maybe it reminds you of that one time... You know which time I'm talking about

Requirements

@adamwathan
adamwathan / Marge.php
Last active September 19, 2023 13:11 — forked from davidhemphill/Marge.php
<?php
namespace App\Merge;
class Marge
{
protected $data = [];
public function setData($data)
{
@odan
odan / xampp_php7_xdebug.md
Last active May 29, 2024 13:56
Installing Xdebug for XAMPP
@RadGH
RadGH / short-number-format.php
Last active April 9, 2024 11:28
Short Number Formatter for PHP (1000 to 1k; 1m; 1b; 1t)
<?php
// Converts a number into a short version, eg: 1000 -> 1k
// Based on: http://stackoverflow.com/a/4371114
function number_format_short( $n, $precision = 1 ) {
if ($n < 900) {
// 0 - 900
$n_format = number_format($n, $precision);
$suffix = '';
} else if ($n < 900000) {
@sarfraznawaz2005
sarfraznawaz2005 / JsonTexter.php
Last active February 12, 2023 20:41
read and write php array to json file
<?php
/*
Class for reading and writing array data in json format
Author: Sarfraz Ahmed (sarfraznawaz2005@gmail.com)
*/
class JsonTexter
{
protected $file = null;
public function __construct($file)
@matula
matula / awesm.md
Last active February 19, 2024 16:23
Awesome PHP stuff in one Gist
@mul14
mul14 / README.md
Last active February 10, 2023 00:55
Simple Laravel Search Trait

Usage

Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so

use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;

class Article extends Model 
{
@krisanalfa
krisanalfa / KeyGenerateCommand.php
Last active September 25, 2023 17:25
Lumen Key Generator Commands
<?php
namespace App\Console\Commands;
use Illuminate\Support\Str;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
class KeyGenerateCommand extends Command
{
@mattstauffer
mattstauffer / log.md
Last active June 14, 2023 09:23
Introduction to GistLog

So, you might be asking yourself, what is GistLog?

GistLog is a blogging "platform" for people who want to quickly write and publish content, in Markdown, and don't want to bother with yet another platform and yet another login and yet another group hoarding their content. With GistLog, you use your pre-existing GitHub login, you store the data in your own GitHub account, and you can publish with a single click.

Using GistLog

  1. Create a public gist with a single file using Markdown. Set the gist description to be the title of your blog post
  2. Copy the gist URL, and paste it into the text box on the GistLog create page
  3. Copy your resulting URL and share it as your blog post—note that it will be in the form of https://gistlog.co/your-github-username/gist-id
  4. If you want to have your own GistLog landing page (e.g. gistlog.co/mattstauffer), [read all about it](https://gistlog.co/mattstauffer/a82db5