Skip to content

Instantly share code, notes, and snippets.

View kevsersrca's full-sized avatar
🚀
Working from home

kev kevsersrca

🚀
Working from home
View GitHub Profile
connect
////////////// Veritabanına bağlanmayı sağlayan sorgu ////
try{
$db= new PDO("mysql:host=localhost;dbname=veritabani_adi","kullanici_adi","sifre");
}
catch (PDOexception $e){
print $e->getMessage();
public bool search(T val)
{
DNode<T> iterator = head;
if (head == null)
return false;
else
{
while (iterator != null)
{
if (iterator.Value.CompareTo(val) == 0)
Title : Name's Page
--Html--
Bir navbar
-girişyap ve kayıt ol butonları olucak
-kayıt ol
-ad
-soyad
-email
-password
-password confirmation
-- Php--
Veritabanı
-connect
-(kayıt ol için)insert into
-(giriş yap için)select
@kevsersrca
kevsersrca / dokku-vagrant-laravel-app
Created August 1, 2017 10:37 — forked from dhovart/dokku-vagrant-laravel-app
Simple steps to set up a Laravel app on dokku in a Vagrant box
# --------------------------------------------------
# Setting up a Laravel app on dokku in a Vagrant box
# --------------------------------------------------
# First: cloning the dokku repo
$ git clone https://github.com/progrium/dokku
$ cd dokku
# Start, configure & provision a new vagrant box using the Vagrantfile from the repo
$ vagrant up
@kevsersrca
kevsersrca / composer_lower_section.json
Created August 1, 2017 10:41 — forked from kn9ts/composer_lower_section.json
Key parts in deploying a laravel application to dokku: composer.json
{
"scripts": {
"post-install-cmd": [
"php artisan optimize",
"chmod -Rvc 777 app/storage",
"chmod -R 777 public",
"php artisan cache:clear",
"php artisan migrate"
],
"post-update-cmd": [
@kevsersrca
kevsersrca / .eugene_aliases.bash
Created August 1, 2017 10:58 — forked from kn9ts/.eugene_aliases.bash
.eugene_mutai.bash
# alias hub (installed with brew to sugar up git) as git
alias git=hub
# sublime aliasing
alias sb=subl
# ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
# other good aliases
alias sites='cd ~/Sites'
alias play="cd ~/Development/playground"
$collection = app(Post::class);
//if tags
$collection = $collection->
whereHas('tags', function ($query) use ($t) {
$query->where('tag_id','=', $t);
});
//if languages
$collection = $collection->whereHas('languages', function ( $query ) use ( $l ){
$query->where('language_id', '=',$l);
@kevsersrca
kevsersrca / gist:fdb0072e8a897f666a2ab29045958639
Last active August 11, 2017 11:14
first day and end day on month
def firstOfMonth(day):
resultDate = day.replace(day=1)
if ((day - resultDate).days > 25):
resultDate = resultDate + relativedelta(months=1)
return resultDate
def lastOfMonth(any_day):
next_month = any_day.replace(day=28) + datetime.timedelta(days=4) # this will never fail
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl