Skip to content

Instantly share code, notes, and snippets.

View manojLondhe's full-sized avatar
💭
I may be slow to respond.

Manoj L manojLondhe

💭
I may be slow to respond.
  • Pune, India
  • 05:31 (UTC +05:30)
View GitHub Profile
@manojLondhe
manojLondhe / AttachJwtToken.php
Created February 22, 2022 11:45 — forked from whoisryosuke/AttachJwtToken.php
Laravel - Testing - Base class to extend basic API tests
<?php
namespace Tests\Traits;
use KushyApi\User;
trait AttachJwtToken
{
/**
* @var User
@manojLondhe
manojLondhe / import_git2git.sh
Created January 6, 2020 06:48 — forked from alghanmi/import_git2git.sh
Import an existing git repository (A) into another (B)
#!/bin/sh
##
## Import an existing git repository (A) into another (B)
##
## Reference: http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
##
REPO_A="<git repo A url>"
REPO_A_DIR="<directory 1>"
@manojLondhe
manojLondhe / joomla-cli-script-email-csv-attachment.php
Last active November 16, 2020 11:48
This Joomla CLI script lets you send a DB query output as CSV attachment via Email
<?php
/**
* @version 3.6
* @package CLI
* @author Manoj L<manoj_l@techjoomla.com>
* @copyright Copyright (c) 2009-2017 Manoj L. All rights reserved
* @license GNU General Public License version 2, or later
*/
// Make sure this is being called from the command line
@manojLondhe
manojLondhe / config
Created January 15, 2015 09:27
GIT - pre receive hook config file for PHPCS check
#title :config
#description :Config for phpcs parameters to work with pre-commit.sh
#usage :add the file on the same location where pre-commit.sh exists. ie. under .git/hooks
#==================================================================================================
# path to phpcs "binary"
PHPCS_BIN=/usr/bin/phpcs
# the coding standard, you can also specify a path to your own standard here
PHPCS_CODING_STANDARD=Joomla
@manojLondhe
manojLondhe / pre-receive
Last active August 29, 2015 14:13
GIT - pre receive hook script file for PHPCS check
#!/bin/sh
# PHP CodeSniffer pre-receive hook for git
# Save it as pre-receive in hooks folder. Give it executable permission
# Based on - https://gist.github.com/bor/1253485
# use coding standart dir from local repo
PHPCS_DIR_LOCAL=0
TMP_DIR=$(mktemp -d --tmpdir phpcs-pre-receive-hook.XXXXXXXX)
mkdir "$TMP_DIR/source"