Skip to content

Instantly share code, notes, and snippets.

At Office

Jagroop Singh jagroop

At Office
Block or report user

Report or block jagroop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jagroop /
Last active Aug 5, 2017
My Sublime text configuration

Sublime text configuration

	"bold_folder_labels": true,
	"caret_extra_bottom": 2,
	"caret_extra_top": 2,
	"caret_extra_width": 3,
	"caret_style": "phase",
	"close_windows_when_empty": true,
jagroop /
Last active Dec 13, 2017
Delete git history

git checkout --orphan latest_branch # Checkout
git add -A # Add all the files
git commit -am "first commit" # Commit the changes
git branch -D master # Delete the branch
git branch -m master # Rename the current branch to master
git push -f origin master # Finally, force update your repository
jagroop / script.php
Created Aug 25, 2017
PHP Multi curl to check if domains are indexed in google
View script.php
function multiRequest($data, $options = array()) {
$curly = array();
$result = array();
$mh = curl_multi_init();
foreach ($data as $id => $d) {
$url = '' . urlencode($d);
$curly[$id] = curl_init($url);
curl_setopt($curly[$id], CURLOPT_RETURNTRANSFER, false);
curl_setopt($curly[$id], CURLOPT_FOLLOWLOCATION, false);
View create.blade.php
<div class="row">
<div class="col-md-12">
<!-- Domain Search form starts -->
<form class="form-horizontal" method="GET" action="{{ route('projects.create') }}" id="projectForm">
<div class="form-group{{ $errors->has('domain_name') ? ' has-error' : '' }}">
<label for="domain_name" class="col-md-4 control-label">Project Name</label>
jagroop / Stripe.php
Created Sep 19, 2017
Stripe Library
View Stripe.php
defined('BASEPATH') OR exit('No direct script access allowed');
use Carbon\Carbon;
class Stripe {
* Default Platform Country
* @var string
jagroop /
Created Oct 24, 2017
Setup FTP on LAN Computer
sudo -s
sudo apt-get update
sudo apt-get install vsftpd
useradd -d /var/www/html/projects/ jagroop-pc
paswd jagroop-pc
# Configuration
jagroop / _3_30_am.php
Last active Nov 17, 2017
Cron jobs Logics
View _3_30_am.php
// 3:30 AM Cron job
public function threeAMCron()
$this->db->where_in('id', [14, 60]);
$this->db->where("date_format(CONVERT_TZ(NOW(), 'UTC', local_tz), '%H:%i') = '15:30'");
$users = $this->db->get('users')->result();
foreach ($users as $key => $user) {
$this->notification->send($user, [
jagroop / Request.php
Last active Nov 21, 2017
Method Overriding Advance Example
View Request.php
class Request
public static function __callStatic($method, $args)
return RequestHandler::new()->{$method}(...$args);
class RequestHandler {
jagroop / App_name.desktop
Last active Nov 24, 2017
Creating a working .desktop file
View App_name.desktop
[Desktop Entry]
Comment=Launch Firefox
jagroop / User.php
Created Nov 27, 2017
Controller Issues | Bad Formatting
View User.php
defined('BASEPATH') OR exit('No direct script access allowed');
use Carbon\Carbon;
class User extends Rest_Controller {
* Uploads Path
const UPLOADS = FCPATH . 'uploads/';
You can’t perform that action at this time.