Skip to content

Instantly share code, notes, and snippets.

View gagandeepjaswal's full-sized avatar

Gagandeep Jaswal gagandeepjaswal

View GitHub Profile
@gagandeepjaswal
gagandeepjaswal / gpMongoUninstall.js
Created March 31, 2017 18:46
Mongo Db Uninstallation
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep mongo
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
launchctl remove homebrew.mxcl.mongodb
pkill -f mongod
// Intall react bundle on mac and linux
npm install -g create-react-app
create-react-app hello-world
cd hello-world
npm start
@gagandeepjaswal
gagandeepjaswal / gpMain.html
Created March 25, 2017 21:02
Meteor React Beggining
<head>
<title>Gugu Score Keep App</title>
</head>
<body>
<div id="app"></div>
</body>
@gagandeepjaswal
gagandeepjaswal / gpCrop.php
Created February 9, 2017 11:42
Upload and crop image using jQuery and PHP
<?php
// Target siz
$targ_w = $_POST['targ_w'];
$targ_h = $_POST['targ_h'];
// quality
$jpeg_quality = 90;
// photo path
$src = $_POST['photo_url'];
$xplode = explode(".", $src);
if($xplode[1] == "jpg") {
@gagandeepjaswal
gagandeepjaswal / gpUsersAgent.php
Last active February 5, 2017 15:39
Get browser, System and Ip info using Codeigniter default libraries.
<?php
/**
* Created by PhpStorm.
* User: gagudeep
* Date: 05/02/17
* Time: 11:37 PM
*/
class LikesController extends CI_Controller {
@gagandeepjaswal
gagandeepjaswal / gpTimerController.swift
Created January 27, 2017 19:36
Create simple timer app using Swift 3 and Xcode 8
//
// ViewController.swift
// runnerApp
//
// Created by Pardip Bhatti on 24/01/17.
// Copyright © 2017 gpCoders. All rights reserved.
//
import UIKit
@gagandeepjaswal
gagandeepjaswal / gpDetailsViewController.swift
Created January 26, 2017 16:29
Simple table view and delete using static array.
//
// DetailsViewController.swift
// TableDemo
//
// Created by Pardip Bhatti on 26/01/17.
// Copyright © 2017 gpCoders. All rights reserved.
//
import UIKit
@gagandeepjaswal
gagandeepjaswal / gpPickerView.swift
Created January 26, 2017 16:14
Get value of pickerview
//
// ViewController.swift
// pickerViewTest
//
// Created by Pardip Bhatti on 23/01/17.
// Copyright © 2017 gpCoders. All rights reserved.
//
import UIKit
@gagandeepjaswal
gagandeepjaswal / gpSlider.swift
Created January 26, 2017 16:02
Get value of slider in swift 3 xcode 8
//
// ViewController.swift
// slider
//
// Created by Pardip Bhatti on 23/01/17.
// Copyright © 2017 gpCoders. All rights reserved.
//
import UIKit
@gagandeepjaswal
gagandeepjaswal / gpTableController.php
Created January 26, 2017 12:19
Codeigniter Server Side Data Tables
<?php
/**
* Created by Pardip Bhatti.
* User: gagudeep
* Date: 24/12/16
*/
class FoodTipsController extends CI_Controller
{