Skip to content

Instantly share code, notes, and snippets.

View almokhtarbr's full-sized avatar
👋

almokhtar almokhtarbr

👋
  • 14:08 (UTC -04:00)
View GitHub Profile
@almokhtarbr
almokhtarbr / BlogController.php
Created June 29, 2018 19:34 — forked from tobysteward/BlogController.php
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@almokhtarbr
almokhtarbr / webdev_online_resources.md
Created July 18, 2018 17:59 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@almokhtarbr
almokhtarbr / Podcasts2018.md
Created September 1, 2018 20:10 — forked from adamayd/Podcasts2018.md
Web Development Podcasts for Beginners in 2018

Web Development Podcasts for Beginners in 2018

Commuting to work from east of Baltimore to Washington DC leaves a lot of time in the car. While driving to work one day early in my web development career, I wondered if there is such a thing as a web development podcast. How would you pull off live coding on a “radio” podcast. Well, you don’t. Well, sometimes they do, but the moral of the story is that I was shocked to find that not only are there web development podcasts, there are a lot of them and really good ones to boot. These podcasts have become staples to my learning and I recommend them to everyone who is just starting out. While there are plenty to listen to, I recommend starting with these. You’ll have plenty of time later to load up deep dives into the V8 JavaScript engine later.

Technology Podcasts

These podcasts are focused more on the technologies used in web development and their use cases.

Syntax - The new kid on the block and by far my favorite right now. Syn

@almokhtarbr
almokhtarbr / gist:8daa66cb6720da9955506e2c3cbc509a
Created September 4, 2018 19:09
My alias for using phpunit via composer package manager
alias phpunit="if [ -f \"./vendor/bin/phpunit\" ]; then php vendor/bin/phpunit; else echo \"It seems you don't have phpunit installed via composer\"; fi"
@almokhtarbr
almokhtarbr / redis_cheatsheet.bash
Created September 9, 2018 22:38 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
/* *******************************************************************************************
* GLOBAL OBJECTS > ARRAY
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
* ******************************************************************************************* */
// Global object: properties
Array.length // Reflects the number of elements in an array
// Global object: methods
@almokhtarbr
almokhtarbr / README.md
Created September 9, 2018 22:43 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@almokhtarbr
almokhtarbr / postgres-cheatsheet.md
Created September 12, 2018 07:32 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@almokhtarbr
almokhtarbr / postgres cheatsheet.md
Created September 12, 2018 07:33 — forked from apolloclark/postgres cheatsheet.md
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@almokhtarbr
almokhtarbr / php-pdo-mysql-crud.md
Created September 12, 2018 16:56 — forked from odan/php-pdo-mysql-crud.md
Basic CRUD operations with PDO and MySQL

Basic CRUD operations with PDO

CRUD = Create, Read, Update, Delete

Open a database connection

$host = '127.0.0.1';
$dbname = 'test';
$username = 'root';