Skip to content

Instantly share code, notes, and snippets.

View Miri92's full-sized avatar

Miri Zulfugar Miri92

View GitHub Profile
@awidegreen
awidegreen / vim_cheatsheet.md
Last active June 17, 2024 03:41
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@ziyaddin
ziyaddin / cbar.php
Last active January 28, 2017 13:20
Parse Cbar.az currencies with PHP
<?php
$date = date ("d.m.Y");
$url = simplexml_load_file("http://cbar.az/currencies/" .$date.".xml");
echo $url->ValType[0]->Valute[2]->Nominal;
echo $url->ValType[0]->Valute[2]->Name;
echo $url->ValType[0]->Valute[2]->Value ."<br />";
echo $url->ValType[0]->Valute[34]->Nominal;
echo $url->ValType[0]->Valute[34]->Name;
@impeto
impeto / Star Rating Component For Laravel Spark.md
Last active May 18, 2018 18:45
A Star Rating Vue.js component for Laravel Spark (or any other Vue.js project, really)

The Vue component

Vue.component('star-component', {
    props: ['sparkForm'],

    data(){
        return {
            stars: 5,
            hover: 5
        };
@asvae
asvae / compare_laravel_and_doctrine_migrations.md
Last active November 13, 2020 18:43
Compare laravel and doctrine migrations

Let’s compare Laravel and Doctrine migrations

Laravel vs Doctrine

This article is targeted on Laravel beginners. No skills required whatsoever. Article is a tad opinionated, so take it with a grain of salt. Also, details are omitted for the sake of brevity.

In this article I will do the actual comparison as well as give several hints to get started.

If you’ve never heard of Doctrine, it is database abstraction layer. Sorta like Eloquent, but different type: Laravel is active record (AR), while Doctrine is object relational mapper (ORM).

Laravel migrations (docs)