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
sineld / Ulke.js
Last active April 4, 2023 18:22
Ulke Script based on php
View Ulke.js
const ulke = {
adalet: () => undefined,
ekonomi: () => undefined,
insanHaklari: () => undefined,
basinOzgurlugu: () => undefined,
kadinCinayetleri: () => Number .MAX_SAFE_INTEGER,
sanat: () => undefined, bilim: () => undefined,
komsularlaSorunSayisi: () => Number.MAX_SAFE_INTEGER,
dolardanEndiselenenVarsa: () => "Birincisi sunu soriyim size. Dolarla mi maas altyorsunuz. Dolar borcunuz mu var? Dolarla bir isiniz mi var?"
cinsiyetAyrimi: () => true,
sineld / db.php
Created April 3, 2023 21:27
Laravel Query Builder Bindings Date Where In Php Array
View db.php
$dates = ['2023-03', '2023-04', '2023-05'];
$binds = implode(',', array_fill(0, count($dates), '?'));
$users = Illuminate\Support\Facades\DB::select(
"SELECT * FROM users WHERE DATE_FORMAT(created_date, '%Y-%m') IN ({$binds})",
sineld / select_lang.php
Created July 6, 2013 05:14
Localisation gone wrong?
View select_lang.php
First of all, thank you for asking this question, looking into it made me understand things a lot better. As it turns out, you can also use parameters for prefixes in route groups. Using a filter, you can then obtain the value of all parameters (so including the prefix of the route group). What you'll want to do is create a filter (best put in filters.php):
Route::filter('select_lang', function($route)
// do check that the lang parameter is valid!
View global.php
// app/start/global.php
| Application Error Logger
| Here we will configure the error logger setup for the application which
sineld /
Created August 14, 2018 10:00 — forked from bzerangue/
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)
sineld /
Created September 19, 2012 15:49 — forked from ziadoz/
Awesome PHP Libraries
sineld / cloudSettings
Last active January 22, 2022 18:11 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
View cloudSettings
sineld / ip.ssh
Created May 13, 2013 07:42
ubuntu static ip
View ip.ssh
sudo nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo eth0
iface lo inet loopback
# The primary network interface
# This script resizes all the images it finds in a folder (and its subfolders) and resizes them
# The resized image is placed in the /resized folder which will reside in the same directory as the image
# chmod +x
# Usage: > ./
# or run:
# sips -Z 600 *.jpg
initial_folder="/your/images/folder" # You can use "." to target the folder in which you are running the script for example