This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool search(T val) | |
{ | |
DNode<T> iterator = head; | |
if (head == null) | |
return false; | |
else | |
{ | |
while (iterator != null) | |
{ | |
if (iterator.Value.CompareTo(val) == 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Title : Name's Page | |
--Html-- | |
Bir navbar | |
-girişyap ve kayıt ol butonları olucak | |
-kayıt ol | |
-ad | |
-soyad | |
-password | |
-password confirmation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Php-- | |
Veritabanı | |
-connect | |
-(kayıt ol için)insert into | |
-(giriş yap için)select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------- | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl |