Skip to content

Instantly share code, notes, and snippets.

View niilante's full-sized 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 January 4, 2022 05:11 — forked from matula/awesm.md
Awesome PHP stuff in one Gist
# 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:
@niilante
niilante / install_php7.4.x_with_pthreads.md
Created January 4, 2022 04:52 — forked from pointybeard/install_php7.4.x_with_pthreads.md
Compiling PHP 7.4.x with pthreads enabled

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 January 4, 2022 04:51 — forked from Jabarabo/githubpull.md
Gist of a stolen gist
@niilante
niilante / FormRequest.php
Created September 12, 2021 20:55 — forked from syofyanzuhad/FormRequest.php
change your default extends FormRequest to your customize FormRequest (API ONLY)
<?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 September 12, 2021 20:52 — forked from syofyanzuhad/FileUploader.php
Laravel Trait for uploading Images / Photos
<?php
namespace App\Traits;
use Illuminate\Support\Facades\Storage;
trait FileUploader
{
/**
* For Upload Images.
@niilante
niilante / active_nav_tag.py
Created July 19, 2021 15:02 — forked from RoboAndie/active_nav_tag.py
Django template tag to highlight the active navigation item
@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 July 14, 2021 10:38 — forked from lukehedger/kill-jekyll.md
Kill Jekyll server

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 April 29, 2021 07:23 — forked from nazmul629/readme.md
Windows 10 activate code

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