Skip to content

Instantly share code, notes, and snippets.

View CiprianSpiridon's full-sized avatar

Ciprian Spiridon CiprianSpiridon

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Open App</title>
<!--
URL Params:
customSchemeURL: Your custom scheme app
storeURL: Your app url at App Store or Google Play
@CiprianSpiridon
CiprianSpiridon / Laravel-Blade-Template-Cheatsheet
Last active April 10, 2024 06:12
Laravel Blade Template Cheatsheet
{{ $var }} - Echo content
{{ $var or 'default' }} - Echo content with a default value
{{{ $var }}} - Echo escaped content
{{-- Comment --}} - A Blade comment
@extends('layout') - Extends a template with a layout
@if(condition) - Starts an if block
@else - Starts an else block
@elseif(condition) - Start a elseif block
@endif - Ends a if block
@CiprianSpiridon
CiprianSpiridon / gist:1d3d8b73d87c4af26b16
Created October 27, 2014 10:08
Function to check if the argument passed is an object
/**
* Returns true if the given object is an element.
* @param cElem {object/jQuery}
* @returns {boolean}
*/
function isDomElement(cElem)
// use this for jQuery objects
if (cElem && cElem.jquery) {
cElem = cElem.get(0);
}
@CiprianSpiridon
CiprianSpiridon / .gitconfig
Created October 27, 2014 10:06
How to usePHPStorm/WebStorm as git diff and merge tools
# ~/.gitconfig
# Add this to your global git configuration file
# Change phpstorm to webstorm, if you use that.
# Diff and merge tool changes
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...`
[merge]
tool = phpstorm
[diff]
tool = phpstorm
@CiprianSpiridon
CiprianSpiridon / My-Default-composer-json-for-a-laravel-project
Last active August 29, 2015 14:08
My Default composer.json for a laravel project (Just require & require-dev)
"require": {
"laravel/framework": "4.2.*",
"greggilbert/recaptcha": "dev-master" /*recapcha as 80% of my projects need it*/
},
"require-dev": {
"way/generators": "2.*", /* laravel generators */
"fzaninotto/faker": "1.2.*@dev", /*i use it to seed my tables with mock data*/
"barryvdh/laravel-ide-helper": "1.11.*@dev", /* ide helper*/
"doctrine/dbal":"2.4.*", /*used to generate models autocomplete by ide_helper*/
"xethron/migrations-generator": "dev-master" /*Generate migration from a mysql database*/
@CiprianSpiridon
CiprianSpiridon / Creating-an-Apache-VirtualHost-in-Ubuntu-for-your-laravel-Project
Created October 25, 2014 15:12
Creating an Apache VirtualHost in Ubuntu for your laravel Project
#go to the conf folder
cd /etc/apache2/sites-available
#create the new .conf file
sudo vi myapp.com.conf
#Add the following content to your .conf file
<VirtualHost *:80>
ServerAdmin webmaster@myapp.com
ServerName myapp.com
@CiprianSpiridon
CiprianSpiridon / Managing-Your-Laravel-Project-With-Git
Created October 25, 2014 15:00
Managing Your Laravel Project With Git
#go into your project folder
cd myapp
#initialize git
git init
#check the status
git status
#Configure Git with your name and email
@CiprianSpiridon
CiprianSpiridon / create-laravel-project-in-a-specifc-folder
Last active August 29, 2015 14:08
Create Laravel Project in a specific Folder
composer create-project laravel/laravel <folder_name>