Skip to content

Instantly share code, notes, and snippets.

View bsormagec's full-sized avatar
:shipit:
Hello World!

Burak Sormageç bsormagec

:shipit:
Hello World!
  • Laravel, Blockchain, Web3, Solidity, NodeJs
  • Toronto,Canada
  • X @bsormagec
View GitHub Profile
@bsormagec
bsormagec / laravel-5.md
Last active November 12, 2017 19:37 — forked from alemohamad/laravel-5.md
Laravel Starter Kit

Install Laravel 5 through Composer

First install Composer, then:

$ composer create-project laravel/laravel <project-name>

After that we can start a webserver, and test the default index page:

@bsormagec
bsormagec / golang.sh
Created November 1, 2017 12:29 — forked from jacoelho/golang.sh
Install golang debian/ubuntu
#!/bin/bash
export GOLANG_VERSION=1.9
export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
export GOLANG_DOWNLOAD_SHA256=d70eadefce8e160638a9a6db97f7192d8463069ab33138893ad3bf31b0650a79
apt-get update -qq
apt-get install -y --no-install-recommends \
g++ \
@bsormagec
bsormagec / 3_nodes.sh
Created October 10, 2017 17:33 — forked from aitoroses/3_nodes.sh
configuring glusterfs
# Assumming we have 3 nodes
NODE1=10.0.1.1
NODE2=10.0.1.2
NODE3=10.0.1.3
# Configure the server
ssh root@NODE1 apt-get install -y glusterfs-server
ssh root@NODE2 apt-get install -y glusterfs-server
ssh root@NODE3 apt-get install -y glusterfs-server
ssh root@NODE1 gluster peer probe NODE2
@bsormagec
bsormagec / webm.md
Created September 26, 2017 08:18 — forked from ndarville/webm.md
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@bsormagec
bsormagec / nginx.conf
Created September 25, 2017 07:34 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@bsormagec
bsormagec / usbreset.c
Created August 23, 2017 07:54 — forked from x2q/usbreset.c
/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
*
* */
@bsormagec
bsormagec / wp-permissions-script
Created June 16, 2017 12:26 — forked from macbleser/wp-permissions-script
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # &lt;-- wordpress owner
WP_GROUP=changeme # &lt;-- wordpress group
WP_ROOT=/home/changeme # &lt;-- wordpress root directory
@bsormagec
bsormagec / guide.md
Created June 6, 2017 13:13 — forked from jayktaylor/guide.md
Instructions for installing Python 3.5 using pyenv on Debian Jessie

Installing Python 3.5 on Debian Jessie with pyenv

Debian Jessie does not come with the correct Python version out of the box, and instead comes with Python 2. To be able to install Python 3(.5), we have a few options. We could build and install from source, but as per Debian's website, we shouldn't do this. Instead, we will use pyenv, a tool that allows users to switch Python versions easily without breaking their system.

Installing pyenv

To install pyenv, we will use the official installer.

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
@bsormagec
bsormagec / gist:3b6118fa4960f3edd719579abde17308
Created March 26, 2017 17:55 — forked from saltun/gist:439794ab032b7a894d91
PHP TC Kimlik Numarası Doğrulama
<meta charset="utf-8">
<?php
function tcno_dogrula($bilgiler){
$gonder = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<TCKimlikNoDogrula xmlns="http://tckimlik.nvi.gov.tr/WS">
<TCKimlikNo>'.$bilgiler["tcno"].'</TCKimlikNo>
<Ad>'.$bilgiler["isim"].'</Ad>
@bsormagec
bsormagec / gist:e85650a3ad86c0d569eee8a3876a8aed
Created January 9, 2017 16:45 — forked from stokic/gist:0105d38c46250ee16245
Envoyer deployment script for staging env
@servers(['staging' => 'user@server -p 22'])
@setup
$base_dir = '/your/path';
$branch = isset($branch) ? $branch : 'develop';
@endsetup
@task('init')
echo "entering deploy directory" {{ $base_dir }};
cd {{ $base_dir }};