Skip to content

Instantly share code, notes, and snippets.

@selahattinunlu
selahattinunlu / gulpfile.js
Created February 12, 2016 16:10
Basic Gulpfile - Sass
var gulp = require('gulp'),
sass = require('gulp-sass');
var sassConfig = {
inputDirectory: 'resources/sass/**/*.scss',
outputDirectory: 'assets/css',
options: {
outputStyle: 'expanded'
}
}
@selahattinunlu
selahattinunlu / jr-du.go
Last active March 26, 2020 21:09
jr-du using go :))
package main
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path"
)

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

[
{
"code": "AD",
"emoji": "🇦🇩",
"unicode": "U+1F1E6 U+1F1E9",
"name": "Andorra",
"title": "flag for Andorra",
"dialCode": "+376"
},
{
@selahattinunlu
selahattinunlu / global-ajax-error-handler.js
Created January 28, 2016 12:31
Jquery Global Ajax Error Handler (For Form Validation Messages)
/**********************************
--------------------
Sample Request
--------------------
$.ajax({
wrapperElement: $('form#wrapperElementClassOrId'),
url: url,
type: 'POST',
@selahattinunlu
selahattinunlu / webpack.config.js
Last active July 13, 2018 20:52
example for extend ionic/app-scripts/config/webpack.config.js
// don't forget to install "lodash" "dotenv"
var ionicWebpackConfig = require('@ionic/app-scripts/config/webpack.config.js');
var webpack = require('webpack');
var _ = require('lodash');
var dotenvConfig = require('dotenv').config();
var dev = ionicWebpackConfig.dev;
var prod = ionicWebpackConfig.prod;
var loadProcessEnvValues = function() {
@selahattinunlu
selahattinunlu / Envoy.blade.php
Last active April 3, 2018 13:00
Envoy.blade.php
@servers(['production' => 'user@ipaddress'])
@setup
$repo = 'git@github.com:selahattinunlu/projectname.com.git';
$releaseDir = '/srv/projectname.com/releases';
$storageDir = '/srv/projectname.com/storage';
$appDir = '/srv/projectname.com/current';
$release = 'release_' . date('d-m-Y-His');
@endsetup
@selahattinunlu
selahattinunlu / gist:e96439d0a1faa588bfea
Created October 9, 2014 08:36
PayuLiveUpdate.class.php
<?php
/* Make sure strlen behaves as intended by setting multibyte function overload to 0 */
ini_set("mbstring.func_overload", 0);
if (ini_get("mbstring.func_overload") > 2) { /* check if mbstring.func_overload is still set to overload strings(2) */
echo "WARNING: mbstring.func_overload is set to overload strings and might cause problems\n";
}
class PayuLu
{
@selahattinunlu
selahattinunlu / gist:1361eb51e305ede9b6a9
Last active April 14, 2017 10:36
PayU Ortak Ödeme Sayfasına Yönlendirmek
<div style="display: none;">
<?php
require(public_path() . '/app/libraries/payu/PayuLiveUpdate.class.php');
if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') {
$liveUpdate = new PayuLu('PAYUDEMO', 'P5@F8*3!m0+?^9s3&u8('); // test için bu hesap bilgilerini kullanabilirsiniz.
$liveUpdate->setTestMode();
} else {
$liveUpdate = new PayuLu('secret','secret'); // Size verilen hesap bilgilerinizi gireceksiniz.
@selahattinunlu
selahattinunlu / wp-editorconfig
Created February 7, 2016 12:45
wordpress editorconfig
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
charset = utf-8
end_of_line = lf