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
shawnlindstrom / TwilioServiceProvider.php
Created Jul 4, 2018
Twilio Service Provider for Laravel
View TwilioServiceProvider.php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Twilio\Rest\Client as TwilioService;
class TwilioServiceProvider extends ServiceProvider
public function register()
gabmontes / delete-all-my-gists.js
Last active Sep 15, 2019
Delete all your gists
View delete-all-my-gists.js
var async = require('async');
var GitHubApi = require('github');
var github = new GitHubApi({
version: '3.0.0',
protocol: 'https'
type: 'basic',
PurpleBooth /
Last active Nov 15, 2019
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


RuGa / massInsertOrUpdate.php
Last active Nov 6, 2019
Mass (bulk) insert or update on duplicate for Laravel 4/5
View massInsertOrUpdate.php
* Mass (bulk) insert or update on duplicate for Laravel 4/5
* insertOrUpdate([
* ['id'=>1,'value'=>10],
* ['id'=>2,'value'=>60]
* ]);
* @param array $rows
dennysfredericci / search-ul-li-item.js
Created Jul 22, 2014
A simple jquery code to search a text inside of li tag
View search-ul-li-item.js
//searchText is a input type text
$('#searchText').bind('keyup', function() {
var searchString = $(this).val();
$("ul li").each(function(index, value) {
currentName = $(value).text()
if( currentName.toUpperCase().indexOf(searchString.toUpperCase()) > -1) {
FrostyX / FacebookDebugger.php
Last active Jun 12, 2019
Facebook API - Force facebook to reload cache from your website
View FacebookDebugger.php
class FacebookDebugger
* Updating Objects
* When an action is published, or a Like button pointing to the object clicked,
* Facebook will 'scrape' the HTML page of the object and read the meta tags.
thomasfr / Git push deployment in 7 easy
Last active Oct 19, 2019
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
View Git push deployment in 7 easy
isimmons / gist:8202227
Last active Nov 12, 2019
Truncate tables with foreign key constraints in a Laravel seed file.
View gist:8202227

For the scenario, imagine posts has a foreign key user_id referencing

public function up()
	Schema::create('posts', function(Blueprint $table) {
chill117 /
Last active Oct 31, 2019
Bash script to perform backups on one or more MySQL databases.
# Use this script to perform backups of one or more MySQL databases.
# Databases that you wish to be backed up by this script. You can have any number of databases specified; encapsilate each database name in single quotes and separate each database name by a space.
# Example:
# databases=( '__DATABASE_1__' '__DATABASE_2__' )
joshhartman / mcrypt-cbc.php
Last active Jul 10, 2019
Rijndael 256-bit Encryption Function (CBC)
View mcrypt-cbc.php
// Define a 32-byte (64 character) hexadecimal encryption key
// Note: The same encryption key used to encrypt the data must be used to decrypt the data
define('ENCRYPTION_KEY', 'd0a7e7997b6d5fcd55f4b5c32611b87cd923e88837b63bf2941ef819dc8ca282');
// Encrypt Function
function mc_encrypt($encrypt, $key){
$encrypt = serialize($encrypt);
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);
$key = pack('H*', $key);
You can’t perform that action at this time.