Skip to content

Instantly share code, notes, and snippets.

View mtigdemir's full-sized avatar
🏠
Working from home

Muharrem Tigdemir mtigdemir

🏠
Working from home
View GitHub Profile
@mtigdemir
mtigdemir / bitbucket-pipelines.yml
Last active February 20, 2023 09:24
Deployer Bitbucket Pipeline
image: mtigdemir/php-deployer-pipeline
pipelines:
branches:
master:
- step:
caches:
- composer
script:
- composer install
@mtigdemir
mtigdemir / Dockerfile
Created April 12, 2018 14:54
Deployer Docker Image
FROM php:7.1-cli-alpine
## Install SSH and Rsync
RUN apk add --no-cache openssh rsync
## Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
## Install Deployer with recipes
RUN composer global require deployer/deployer
@mtigdemir
mtigdemir / .htaccess
Created February 15, 2018 11:19
Redirect All .html links to non html links with 301
## Redirect All .html links to non html links with 301
RewriteCond %{THE_REQUEST} \.html
RewriteRule ^(.*)\.html$ /$1 [R=301,L]
@mtigdemir
mtigdemir / mysql_connect.sh
Last active January 20, 2018 15:05
Connect to Remote Mysql
#!/bin/sh
ssh -t {sshConfig} 'mysql -h {hostname} -u {username} -p '
@mtigdemir
mtigdemir / docker_runnable.sh
Last active May 30, 2018 08:00
Docker Runnable Commands
## All Commands should locate under /usr/local/bin folder
## Composer
#!/bin/sh
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
echo "Composer Current working directory: '"$(pwd)"'"
docker run --rm -it --tty -v $(pwd):/app -v ~/.composer:/tmp composer $@
## PHP
@mtigdemir
mtigdemir / .project.yml
Last active January 11, 2021 20:45
Tmux Conf
## In
name: project
root: ~/Workspace
windows:
- local:
layout: e9c7,272x60,0,0{136x60,0,0[136x30,0,0,37,136x29,0,31,42],135x60,137,0,41}
panes:
- echo 'Command'
- cd ~/Workspace
@mtigdemir
mtigdemir / .gitignore_global
Last active January 20, 2018 11:20
IntelliJ - Mac OSX
# Created by https://www.gitignore.io
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
@mtigdemir
mtigdemir / Member.php
Created November 28, 2017 11:03 — forked from jlem/Member.php
Medium Laravel Story - Member.php
<?php
class Member extends Model implements MemberInterface
{
const ATTR_DISPLAY_NAME = ‘display_name’;
const ATTR_LOGIN_NAME = ‘login_name’;
const ATTR_POST_COUNT = ‘posts’;
protected $fillable = [
self::ATTR_LOGIN_NAME,
# strip out iBooks citation
sed -E -e 's/^[ ]?[0-9]* //g' | sed -E -e 's/“[ ]?[0-9]?[ ]?//g' | sed -E -e 's/”$//g' | sed -E -e 's/^(Excerpt From).*//g'
@mtigdemir
mtigdemir / .tmux.conf
Last active June 6, 2021 16:52 — forked from v-yarotsky/.tmux.conf
Mac OS X tmux config
### INSTALLATION NOTES ###
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Put itunesartist and itunestrack into PATH