Skip to content

Instantly share code, notes, and snippets.

@johnnykent7
johnnykent7 / 0_reuse_code.js
Created May 12, 2017 12:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@johnnykent7
johnnykent7 / asda
Created May 20, 2017 14:28
sublime
dsdfsdfsdf
@johnnykent7
johnnykent7 / xml
Created July 11, 2018 08:45
connection code first
<add name="DefaultConnection" connectionString="Data Source=WINDOWS-GES0RR6; initial catalog =PlutoCodeFirst; integrated security=SSPI" providerName="System.Data.SqlClient" />
@johnnykent7
johnnykent7 / MY_Model.md
Created January 28, 2020 09:26 — forked from joseluisq/MY_Model.md
CodeIgniter PHP extended Model for CI Model.

MY_Model

CodeIgniter extended Model for CI Model.

Installation

Copy and paste MY_Model.php file to core directory: application/core/MY_Model.php

Model settings

For example: user_model located at application/models/user_model.php :

@johnnykent7
johnnykent7 / eloquent-cheatsheet.md
Last active August 16, 2021 06:42 — forked from hassansin/eloquent-cheatsheet.php
Laravel 5 Eloquent CheatSheet #laravel #eloquent
Model::

  /*Select*/
  select('col1','col2')
  ->select(array('col1','col2'))
  ->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating'))  
  ->addSelect('col3','col4')
  ->distinct() // distinct select
  
Artisan 
// Displays help for a given command
php artisan --help OR -h
// Do not output any message
php artisan --quiet OR -q
// Display this application version
php artisan --version OR -V
// Do not ask any interactive question
php artisan --no-interaction OR -n
@johnnykent7
johnnykent7 / collections.md
Created May 23, 2020 17:50 — forked from DarkGhostHunter/collections.md
Laravel Collection Methods order by Purpose

Collection methods

This is a list of Collection methods, ordered by purpose, instead of just an alphabetical order.

This allows you to quickly find the methods for the action you want to do, instead of checking the list one by one.


@johnnykent7
johnnykent7 / ssh.md
Created April 16, 2021 10:49 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@johnnykent7
johnnykent7 / laravel-dev-installation.md
Created June 30, 2021 09:20 — forked from Cenay/laravel-dev-installation.md
When starting a new Laravel project, these are the things I do to help speed my process up and provide the best tools for the project. As of the time of this writing, Laravel 6 is the default dist version.

Laravel Developer Installation Helpers

When starting a new Laravel project, these are the things I do to help speed my process up and provide the best tools for the project. As of the time of this writing, Laravel 6 is the default dist version.

NOTE:
See this gist for more items to install (but note that this was for Laravel 5 and some of these are no longer necessary as Laravel matures).

Packages That Are Necessary

Allows the IDE to understand Laravel special syntax (facade, factories, etc)