Skip to content

Instantly share code, notes, and snippets.

🏠
Working from own office

Sinan Eldem sineld

🏠
Working from own office
Block or report user

Report or block sineld

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sineld
sineld / valet.conf
Created Apr 13, 2019 — forked from poul-kg/valet.conf
CORS Rules for Laravel Valet Nginx
View valet.conf
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
@sineld
sineld / optgroup.php
Created Oct 2, 2012
Laravel: Using form::select with <optgroup>
View optgroup.php
<?php
//Source: http://forums.laravel.com/viewtopic.php?id=2807
Route::get('optgroup', function()
{
$eat_options = array(
'animals' => array(
'cats',
'dogs',
'monkeys',
@sineld
sineld / url_slug.js
Created Dec 25, 2018 — forked from sgmurphy/url_slug.js
URL Slugs in Javascript (with UTF-8 and Transliteration Support)
View url_slug.js
/**
* Create a web friendly URL slug from a string.
*
* Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
@sineld
sineld / add-option-to-dropdown.js
Created Oct 16, 2018 — forked from paulund/add-option-to-dropdown.js
Add and Remove Options in Select using jQuery
View add-option-to-dropdown.js
$("#selectBox").append('<option value="option6">option6</option>');
@sineld
sineld / _verify-repair-permissions-disk.md
Created Aug 14, 2018 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)
View _verify-repair-permissions-disk.md

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

View gist:ac7bad83e10ccf8831281cae9cc804cd
<?php
$progressBar = $this->output->createProgressBar(count($users));
$progressBar->setEmptyBarCharacter(' ');
$progressBar->setProgressCharacter('>');
$progressBar->setBarCharacter('-');
$progressBar->start();
foreach ($users as $user) {
$this->performTask($user);
@sineld
sineld / InputEdit.vue
Created Mar 15, 2018 — forked from nckg/InputEdit.vue
Vue Inline edit
View InputEdit.vue
<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"
@sineld
sineld / class.phpmailer.php
Created Aug 13, 2013
Mandrillapp ile Phpmailer
View class.phpmailer.php
<?php
/*~ class.phpmailer.php
.---------------------------------------------------------------------------.
| Software: PHPMailer - PHP email class |
| Version: 5.2.1 |
| Site: https://code.google.com/a/apache-extras.org/p/phpmailer/ |
| ------------------------------------------------------------------------- |
| Admin: Jim Jagielski (project admininistrator) |
| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
@sineld
sineld / clock.js
Last active Feb 19, 2018
Create Your Own jQuery Digital Clock
View clock.js
/*
Create Your Own jQuery Digital Clock
http://www.sitepoint.com/create-jquery-digital-clock-jquery4u/
*/
<script>
function updateClock()
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
@sineld
sineld / passwordvalidation
Created Dec 30, 2017 — forked from Michael-Brooks/passwordValidation.php
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
View passwordvalidation
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
*/
$rules = array(
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
);
/*
* Use this one if you also require at least one symbol.
You can’t perform that action at this time.