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
View Auth.php
defined('BASEPATH') OR exit('No direct script access allowed');
class Auth extends Rest_Controller {
* Device types allowed in app
const DEVICE_TYPES = ['ios', 'android'];
jagroop / Database.php
Created Nov 27, 2017
insert or update if duplicate (Bulk)
View Database.php
public static function insertOrUpdate($table, array $rows)
$first = reset($rows);
$columns = implode(',', array_map(function($value)
return "$value";
}, array_keys($first)));
$values = implode(',', array_map(function($row)
View dawghoused.html
<!-- PMA-SQL-ERROR -->
<div class="error"><h1>Error</h1>
<p><strong>SQL query:</strong>
<a href="tbl_sql.php?sql_query=SHOW+TABLE+STATUS+FROM+%60dawghoused%60+LIKE+%27dawghoused_bp_notifications%27&amp;show_query=1&amp;db=dawghoused&amp;table=dawghoused_bp_notifications&amp;token=8ec2db191e1e1dc37a8fc266da54e6eb"><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span></a> </p>
<span class="syntax"><span class="inner_sql"><a href="./url.php?;token=8ec2db191e1e1dc37a8fc266da54e6eb" target="mysql_doc"><span class="syntax_alpha syntax_alpha_reservedWord">SHOW</span></a> <span class="syntax_alpha syntax_alpha_reservedWord">TABLE</span> <span class="syntax_alpha syntax_alpha_reservedWord">STATUS</span> <span class="syntax_alpha syntax_alpha_reservedWord">FROM</span> <span class="syntax_quote syntax_quote_backtick">`dawghoused`</span> <a href="./url.php?url=http%3A%2F%2Fdev.mys
jagroop /
Created Nov 28, 2017 — forked from jexchan/
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C ""
View query.sql
select as user_id, first_name, last_name, bp.*, risk.* from test_type_verification as test
inner join `jbt_testeeUsers` as usr on test.user_id =
left join bp_a1c_risk_ques_2016 as bp on test.user_id = bp.user_id
left join risk_Assessment_questions_2016 as risk on test.user_id = risk.user_id
where = 133
View TournamentsController.php
namespace App\Http\Controllers\Admin\Tournaments;
use App\Http\Controllers\Controller;
use App\Models\Tournament;
use Excel;
use Illuminate\Http\Request;
use Validator;
jagroop /
Last active Dec 13, 2017 — forked from rolinger/gist:d6500d65128db95f004041c2b636753a
PHP => FCM Push notification tutorial for Android and iOS

Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this earlier implementation of Googles GCM method: - FCM is the new method and GCM will eventually be retired.


Register your app in the FCM Console: (add project)

  1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings.
  2. Click on the GEAR settings icon, and then on "Project Settings"
  3. In the main screen, click on "Cloud Messaging"
View cb-test.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<script src="//"></script>
<input type="text" id="sample-text" value="Lorem ipsum dolor sit amet">
View ajax.php
require 'init.php';
$done = false;
if(isset($_POST['username'], $_POST['userjob']))
$data = [
'name' => $_POST['username'],
You can’t perform that action at this time.