Skip to content

Instantly share code, notes, and snippets.

View sarfraznawaz2005's full-sized avatar
🏠
Working from home

Sarfraz Ahmed sarfraznawaz2005

🏠
Working from home
View GitHub Profile
@echo off
(
rem #########################################################
rem kill not responding processes
rem #########################################################
taskkill.exe /F /FI "status eq NOT RESPONDING"
@sarfraznawaz2005
sarfraznawaz2005 / index.md
Created December 16, 2022 12:45 — forked from meigwilym/index.md
Notes on stitcher.io's Laravel beyond CRUD

Laravel beyond CRUD

stitcher.io

A blog series for PHP developers working on larger-than-average Laravel projects

Written for projects with a development lifespan of six to twelve months, with a team of three to six developers working on them simultaneously.

Chapter 1: Domain oriented Laravel

@sarfraznawaz2005
sarfraznawaz2005 / sso_link.php
Created August 29, 2022 15:26
Login via link - SSO
@sarfraznawaz2005
sarfraznawaz2005 / parse-commit-log.php
Created August 22, 2020 21:48 — forked from drupol/parse-commit-log.php
Parse commit log with loophp/collection
<?php
declare(strict_types=1);
include 'vendor/autoload.php';
use loophp\collection\Collection;
use loophp\collection\Contract\Operation\Sortable;
$commandStream = static function (string $command): Generator {
<?php
/*
* Class to connect to remote server via SSH.
*
* Requires phpseclib/phpseclib package which can be imported via composer.
*/
namespace AgentsApp\Libs;
@sarfraznawaz2005
sarfraznawaz2005 / website-lock-screen.js
Created November 5, 2019 13:39
userscript to lock a website by password
// ==UserScript==
// @name Lock Screen
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Locks given websites.
// @author Sarfraz
// @match https://web.whatsapp.com/*
// @grant none
// ==/UserScript==
@sarfraznawaz2005
sarfraznawaz2005 / push.sh
Created December 16, 2018 13:01
git pull push with tags
#!/bin/sh
GREEN='\033[1;32m'
NC='\033[0m' # No color
echo -e "${GREEN}Pulling first...${NC}"
git pull
echo
echo Listing changed files:
@sarfraznawaz2005
sarfraznawaz2005 / gh-pages.md
Created March 4, 2018 07:02 — forked from ramnathv/gh-pages.md
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" &gt; index.html
https://USERNAME:[email protected]/USERNAME/REPONAME.git