Skip to content

Instantly share code, notes, and snippets.

View tomysmile's full-sized avatar

Tomy Ismail tomysmile

  • Thinkspedia
  • Dubai
  • 01:12 (UTC +07:00)
View GitHub Profile
@tomysmile
tomysmile / laravel-admin-lte-pratt.md
Last active February 25, 2020 10:47
laravel: Admin LTE template

#AdminLTE/Pratt template Laravel 5 package A Laravel 5 package that switch default Laravel scaffolding / boilerplate to AdminLTE template with Bootstrap 3.0 and Pratt Landing Page

See demo here:

http://demo.adminlte.acacha.org/

If you are looking for the Laravel 4 version, use 0.1.5 version/tag and see OLD-README.md

Total Downloads

@tomysmile
tomysmile / 01_Laravel 5 Simple ACL manager_Readme.md
Created January 8, 2016 06:40 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@tomysmile
tomysmile / laravel-add-createdby.md
Created January 11, 2016 07:49
Laravel: Adding Created_By
<?php

namespace App;

use Auth;
use Illuminate\Database\Eloquent\Model as Eloquent;

class BaseModel extends Eloquent{
 
@tomysmile
tomysmile / laravel-batch-insert.md
Created January 11, 2016 11:15
Laravel: Batch Insert
//A single array with all your CSV data
$products;
//Number of rows to insert per query
$rowsPerChunk = 100;

$productChunks = array_chunk($products, $rowsPerChunk);
foreach($productChunks as $chunk) {
    DB::table('products')->insert($chunk);
}
@tomysmile
tomysmile / mac-osx-homebrew-setup.md
Last active July 12, 2016 06:12 — forked from sr75/osx-homebrew-setup.md
Mac Yosemite OSX - Homebrew (RVM/MySQL/Redis) setup

Mac Homebrew (RVM/MySQL/Redis) setup

Follow the steps below to setup a local development environment:

XQuartz

Recommended to download latest XQuartz

iTerm2

@tomysmile
tomysmile / rpi-autologin.md
Last active March 12, 2016 03:41
Raspberry Pi: Auto Login

#Setting up Auto-login

Your Raspberry Pi will be without a keyboard and without a monitor and accessible only by ssh — at least that's the setup that I'd recommend using. For that reason, we want to set it up to automatically login.

After the reboot, at the command line, enter:

sudo nano /etc/inittab
now, scroll down to the line:
1:2345:respawn:/sbin/getty 115200 tty1
@tomysmile
tomysmile / rpi-generate-ssh.md
Last active March 12, 2016 03:42
Raspberry Pi:Generate SSH

Generating SSH Key on Raspberry Pi

If somehow you can't connect to your RPi, try to regenerate the keys by doing these:

ssh-keygen -t 'dsa'
ssh-keygen -t 'rsa'

now try again to connect to SSH:

@tomysmile
tomysmile / rpi-configure-locales.md
Last active June 29, 2023 14:37
Raspberry Pi: Reconfigure Locales

Reconfigure your RPi Locales

First you need to install the locales you want:

sudo dpkg-reconfigure locales

Then refresh your current environment:

@tomysmile
tomysmile / rpi-update-upgrade.md
Created March 12, 2016 03:50
Raspberry Pi: Update & Upgrade

How to Update & Upgrade your RPi

here's how, On the command line, type in:

sudo apt-get update
sudo apt-get upgrade

Both of these commands will give you a lot of gobbledygook. You will wait awhile. Be patient. These update package lists from the various repositories and updates them to get information on the newest versions of packages and their dependencies.

@tomysmile
tomysmile / rpi-rdc-setup.md
Created March 12, 2016 03:55
Raspberry Pi: RPi for Remote Desktop

Configuring the Raspberry Pi ethernet port for remote desktop control (RDC)

XRDP must be installed on your Raspberry Pi before you can use RDP:

sudo apt-get install xrdp

Now, from a Windows PC use the command: