Skip to content

Instantly share code, notes, and snippets.

Avatar
🌊
I'm a builder more than a Mason

Richard Nii Lante Lawson niilante

🌊
I'm a builder more than a Mason
View GitHub Profile
@niilante
niilante / awesm.md
Created Jan 4, 2022 — forked from matula/awesm.md
Awesome PHP stuff in one Gist
View awesm.md
View laravel-bitbucket-pipelines.yml
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# You can specify a custom docker image from Docker Hub as your build environment.
# run composer check-platform-reqs for a list of required extensions.
image: php:7.2-fpm
pipelines:
default:
# Not needed unless you're doing feature tests.
# - step:
View install_php7.4.x_with_pthreads.md

Compiling PHP 7.4.x with pthreads (https://github.com/pmmp/pthreads) enabled

Install required libraries

build-essential autoconf libtool bison re2c pkg-config git-core libsqlite3-dev libonig-dev libzip-dev libltdl-dev libbz2-dev libxml2-dev libxslt1-dev libssl-dev libicu-dev libpspell-dev libenchant-dev libmcrypt-dev libpng-dev libjpeg8-dev libfreetype6-dev libmysqlclient-dev libreadline-dev libcurl4-openssl-dev

Download PHP 7.4.x source

cd /var/sources

wget https://www.php.net/distributions/php-7.4.24.tar.gz

@niilante
niilante / githubpull.md
Created Jan 4, 2022 — forked from Jabarabo/githubpull.md
Gist of a stolen gist
View githubpull.md
@niilante
niilante / FormRequest.php
Created Sep 12, 2021 — forked from syofyanzuhad/FormRequest.php
change your default extends FormRequest to your customize FormRequest (API ONLY)
View FormRequest.php
<?php
namespace App\Http\Requests\Api;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Validation\ValidationException;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Foundation\Http\FormRequest as LaravelFormRequest;
@niilante
niilante / FileUploader.php
Created Sep 12, 2021 — forked from syofyanzuhad/FileUploader.php
Laravel Trait for uploading Images / Photos
View FileUploader.php
<?php
namespace App\Traits;
use Illuminate\Support\Facades\Storage;
trait FileUploader
{
/**
* For Upload Images.
@niilante
niilante / active_nav_tag.py
Created Jul 19, 2021 — forked from RoboAndie/active_nav_tag.py
Django template tag to highlight the active navigation item
View active_nav_tag.py
@register.simple_tag(takes_context=True)
def active_nav(context, pattern_or_urlname, is_sr_text=False):
path = context['request'].path
if ',' in pattern_or_urlname:
patterns_to_try = pattern_or_urlname.split(',')
else:
patterns_to_try = [pattern_or_urlname]
for pattern in patterns_to_try:
try:
p = '^' + reverse(pattern)
@niilante
niilante / kill-jekyll.md
Created Jul 14, 2021 — forked from lukehedger/kill-jekyll.md
Kill Jekyll server
View kill-jekyll.md

Stopping a Jekyll server with ctrl-z can cause issues as the process is not stopped fully. To kill it:

$ lsof -wni tcp:4000
$ kill -9 <PID of process>

And next time, use crtl-c to stop.

@niilante
niilante / readme.md
Created Apr 29, 2021 — forked from nazmul629/readme.md
Windows 10 activate code
View readme.md

Windows 10 Active process

  • Step 1. Fast create a .txt file.
  • step 2. Then Copy this .text and past on the .txt file .
@echo off
title Windows 10 ALL version activator&cls&echo ************************************ 
&echo Copyright: Youtube: ithelpbd.com &echo.&echo Supported products:&echo - Windows 10 Home&echo - Windows 10 Professional&echo - Windows 10 Enterprise, Enterprise LTSB&echo - Windows 10 Education&echo.&echo.&echo ************************************ &echo Windows 10 activation...
cscript //nologo c:\windows\system32\slmgr.vbs /ipk TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 3KHY7-WNT83-DGQKR-F7HPR-844BM >nul