Skip to content

Instantly share code, notes, and snippets.

View mucahit's full-sized avatar
👨‍💻

Mucahit Tutuncu mucahit

👨‍💻
View GitHub Profile
@mucahit
mucahit / class.session.php
Last active August 29, 2015 14:03
Session class with php ♥
<?php
class sess
{
public static function create($array){
foreach ($array as $key => $value) {
#create session
$_SESSION[$key] = $value;
@mucahit
mucahit / post.class.php
Last active August 29, 2015 14:04
dipnot : postla alınan değerlere filtreleme uygulanmamıştır
<?php
class method{
public $return;
public $values = [];
//POST method function
public function post($names){
$type = gettype($names);
if($type == 'array')
@mucahit
mucahit / .zshrc
Created May 25, 2015 10:39
My .zshrc file
# Path to your oh-my-zsh installation.
export ZSH=/Users/muco/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
{
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_extra_width": 2,
"color_scheme": "Packages/Seti_UI/Scheme/Seti.tmTheme",
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
@for $index from 1 through 6 {
h#{$index}{
font: 32px/42px trajan-pro-1,trajan-pro-2;
}
}
@mucahit
mucahit / parse_duration.php
Created July 7, 2015 16:03
Youtube Api Duration to Seconds
function parse_duration($duration, $resultType){
$matches = array();
preg_match('/^(-|)?P([0-9]+Y|)?([0-9]+M|)?([0-9]+D|)?T?([0-9]+H|)?([0-9]+M|)?([0-9]+S|)?$/', $duration, $matches);
if(!empty($matches)){
foreach($matches as &$match){
$match = preg_replace('/((?!([0-9]|-)).)*/', '', $match);
}
@mucahit
mucahit / _helpers.scss
Created July 17, 2015 11:45
vertical-align center helper
.vertical-center{
display:flex;
justify-content:flex-end;
align-items:center;
}
@mucahit
mucahit / box-example.html
Created July 21, 2015 12:13
for gokhanakkurt
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img src="http://lorempixel.com/400/200" alt="...">
<div class="caption">
<h4><a href="#">Ahmet Çakar</a></h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias rerum laborum provident, similique error hic qui nemo, dolorem veritatis modi facilis eaque dicta enim ipsam accusamus sed. Iure, commodi nobis!</p>
<p><a href="#"><i class="fa fa-clock-o"></i> 3 Hours Ago</a></p>
<p><button class="btn btn-warning">Delete</button> &nbsp; <button class="btn btn-success">Approve</button></p>
</div>
@mucahit
mucahit / Preferences.sublime-settings
Created August 24, 2015 07:53
My sublime preferences
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 3,
"line_padding_top": 3,
@mucahit
mucahit / default.sublime-keymap
Created August 24, 2015 07:54
My sublime key bindings
[
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+shift+r"], "command": "reindent" },
{ "keys": ["alt+tab"], "command": "indent" },
{ "keys": ["shift+tab"], "command": "unindent" },
{ // TodoReview: Open Files
"keys": ["control+shift+t"],
"command": "todo_review",
}