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 / AES-256 encryption and decryption in PHP and C#.md
Created April 24, 2018 09:21
AES-256 encryption and decryption in PHP and C#

AES-256 encryption and decryption in PHP and C#

Update: There is a more secure version available. Details

PHP

<?php

$plaintext = 'My secret message 1234';
@bsormagec
bsormagec / migrating-from-mysql-to-postgres.rst
Created March 24, 2018 13:01 — forked from igniteflow/migrating-from-mysql-to-postgres.rst
Migrating from MySQL to Postgres in Ubuntu

Migrating from MySQL to Postgres in Ubuntu

Dump your database:

mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root databasename

Convert the dump to Postgres syntax using https://github.com/lanyrd/mysql-postgresql-converter:

wget https://raw.github.com/lanyrd/mysql-postgresql-converter/master/db_converter.py
@bsormagec
bsormagec / default
Created January 9, 2018 12:26 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@bsormagec
bsormagec / MongoDB_macOS_Sierra.md
Created January 9, 2018 12:25 — forked from nrollr/MongoDB_macOS_Sierra.md
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@bsormagec
bsormagec / varnish-purge-cache.sh
Created December 11, 2017 12:44 — forked from andrezrv/varnish-purge-cache.sh
Purge all Varnish cache.
# Purge all Varnish cache
varnishadm "ban req.url ~ /"
@bsormagec
bsormagec / setup_wp.sh
Created December 4, 2017 21:34 — forked from emmanuelstroem/setup_wp.sh
setup_wordpress_ubuntu
#!/bin/sh
export DEBIAN_FRONTEND="noninteractive"
# command line arguments
if [ $# -gt 0 ]; then
echo "Your command line contains $# arguments"
domain_name="$1"
else
echo "Your command line contains no arguments"
domain_name="emmanuelopio"
Run this command to install MG-CLI:
sudo apt-get update && wget https://minergate.com/download/deb-cli -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb
to start miner (4 cores for BCN) use this command:
minergate-cli -user <YOUR@EMAIL.KAPPA> -bcn 4
Feel free to send some of your earnings to me:
BTC (Don't attempt to send other coins to this address!): 17f77AYHsQbdsB1Q6BbqPahJ8ZrjFLYH2j
@bsormagec
bsormagec / Vagrantfile
Created November 12, 2017 09:13 — forked from saboyutaka/Vagrantfile
vagrant for AmazonLinux, php71, laravel, nginx, mysql, redis
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2".freeze
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "mvbcoding/awslinux"
# Mount shared folder
config.vm.synced_folder ".", "/vagrant/www"
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
hostname: pantybay
name: pantybay
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
@bsormagec
bsormagec / Vagrantfile
Created November 12, 2017 09:13 — forked from neilndev/Vagrantfile
Laravel 5.4, apache2 and redis
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = '2'
@script = <<SCRIPT
# Variables
db_host=127.0.0.1
root_passwd=sat
db_name=uprojectdb