Skip to content

Instantly share code, notes, and snippets.

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License

@ujackson
ujackson / select2-bootstrap3.css
Created December 18, 2017 11:21 — forked from alfredobarron/select2-bootstrap3.css
Height select 2 in bootstrap 3.3.4
/**
* Change three lines
*
/* line 11 */
.select2-container .select2-selection--single {
box-sizing: border-box;
cursor: pointer;
display: block;
height: 34px;
user-select: none;
@ujackson
ujackson / auto_suggest.md
Created December 18, 2017 08:53 — forked from nunoprat/auto_suggest.md
Typeahead.js & Laravel 5
  • view/index.blade.php
{{ Form::open(['url' => '/profile', 'method' => 'get']) }}
	{{ Form::text('user', null, ['id'=>'users']) }}
	{{ Form::submit('GO') }}
{{ Form::close() }}
  • routes.php
get('/', 'SearchController@index');
@ujackson
ujackson / youtube_id_regex.php
Created October 21, 2017 23:05 — forked from ghalusa/youtube_id_regex.php
Extract the YouTube Video ID from a URL in PHP
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
// http://youtu.be/dQw4w9WgXcQ
// http://www.youtube.com/embed/dQw4w9WgXcQ
// http://www.youtube.com/watch?v=dQw4w9WgXcQ
// http://www.youtube.com/?v=dQw4w9WgXcQ
// http://www.youtube.com/v/dQw4w9WgXcQ
// http://www.youtube.com/e/dQw4w9WgXcQ
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ
@ujackson
ujackson / autocomplete.php
Created October 19, 2017 01:49 — forked from imranismail/autocomplete.php
Laravel And JqueryUI's Autocomplete Plugin
//SearchController.php
public function autocomplete(){
$term = Input::get('term');
$results = array();
$queries = DB::table('users')
->where('first_name', 'LIKE', '%'.$term.'%')
->orWhere('last_name', 'LIKE', '%'.$term.'%')
->take(5)->get();
@ujackson
ujackson / controller.php
Created October 16, 2017 17:04 — forked from gormus/controller.php
Geospatial sort by distance using Laravel 4 and MySQL. I'm using a point column named geolocation in a table called meetings.
<?php
class MeetingsController extends \BaseController {
/**
* Display a listing of the resource.
* GET /meetings
*
* @return Response
*/
@ujackson
ujackson / select2-override.css
Created October 16, 2017 14:04 — forked from andrewbranch/select2-override.css
Flat styling of select2.
.select2-container .select2-choice {
height: 34px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: #fff;
background-image: none;
background: #fff;
}
'routes' => array(
'login' => array('middleware' => ['web']),
'admin' => array('middleware' => ['web', 'auth']),
'account' => array('middleware' => ['web', 'auth']),
'default' => array('middleware' => ['web']),
'confirm' => array('middleware' => ['web']),
'update' => array(),
),
'page' => array(
@ujackson
ujackson / PaystackCharge.php
Last active May 18, 2017 15:23 — forked from ibrahimlawal/PaystackFees.php
A php class to add paystack's local charge to a transaction total. Totally flops if the user pays with a foreign card.
<?php
class PaystackCharge{
public $percentage;
public $additional_charge;
public $crossover_total;
public $cap;
public $charge_divider;
public $crossover;
@ujackson
ujackson / Install composer on Amazon AMI running on EC2
Created December 11, 2016 14:44 — forked from asugai/Install composer on Amazon AMI running on EC2
Install composer on Amazon AMI running on EC2
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install