Skip to content

Instantly share code, notes, and snippets.

View sineld's full-sized avatar
🏢
Full Stack Developer

Sinan Eldem sineld

🏢
Full Stack Developer
View GitHub Profile
@TahaSh
TahaSh / ajax-validation-with-vue.js
Created January 16, 2016 14:36
Ajax validation with VueJS
new Vue({
el: '#app',
data: {
formInputs: {},
formErrors: {}
},
methods: {
submitForm: function(e) {
@nckg
nckg / InputEdit.vue
Created June 13, 2017 14:00
Vue Inline edit
<template>
<div>
<span v-show="!editing"
@click="toggleEdit" v-html="showValue"></span>
<div v-show="editing" class="row">
<div class="col-md-10">
<div class="form-group">
<textarea class="form-control"
rows="3"
function ydl()
{
youtube-dl --extract-audio --audio-format mp3 "$@" --ignore-errors
}
# youtube-dl: https://rg3.github.io/youtube-dl/
# ornek: ydl "https://www.youtube.com/playlist?list=PL55713C70BA91BD6E"
@santigarcor
santigarcor / Laravel PHP7 LEMP AWS.md
Last active June 15, 2018 03:34 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@javymarmol
javymarmol / LC_CTYPE.txt
Created November 20, 2017 21:52
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@stidges
stidges / AllowedUsernameValidator.php
Created March 10, 2017 18:21
Code to accompany the 'Writing an Allowed Username Validator in Laravel' (http://blog.stidges.com/post/writing-an-allowed-username-validator-in-laravel)
<?php
# app/Validation/AllowedUsernameValidator.php
namespace App\Validation;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\Router;
use Illuminate\Config\Repository;
@driesvints
driesvints / laravel-weekly-25-quick-tip.php
Last active March 28, 2019 13:52
Laravel Weekly #25 Quick Tip
<?php
// Get an array of all files in a directory.
$files = File::files('path_to_dir');
// Get all of the files from the given directory (recursive).
$files = File::allFiles('path_to_dir');
// Get all of the directories within a given directory.
$files = File::directory('path_to_dir');
@tobikris
tobikris / gist:2d709777024b7bc40370
Created June 25, 2015 17:25
Artisan Command Progressbar
<?php
$progressBar = $this->output->createProgressBar(count($users));
$progressBar->setEmptyBarCharacter(' ');
$progressBar->setProgressCharacter('>');
$progressBar->setBarCharacter('-');
$progressBar->start();
foreach ($users as $user) {
$this->performTask($user);
@barryvdh
barryvdh / laravel4_codeintel_helper.php
Last active June 8, 2020 06:46
Laravel 4 IDE Helper; CodeIntel version, generated using https://github.com/barryvdh/laravel-ide-helper (With the sublime option)
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated with https://github.com/barryvdh/laravel-ide-helper
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
// This is now merged with: https://gist.github.com/barryvdh/5227822
// The same format is used for phpStorm, netBeans and Sublime Text Codeintel!
@hdogan
hdogan / cekilis.php
Last active September 23, 2020 11:00
Linux Yaz Kampı 2013 - PHP ile Yazılım Geliştirme Kursu Çekiliş Kodu
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8">
<title>Çekiliş</title>
<style>
body {
font-family: Tahoma, sans-serif;
font-size: 40px;
}