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 / .bashrc
Last active August 29, 2015 14:23 — forked from thomaspuppe/.bashrc
# NOTE: This shit is mixed up (Ubuntu Linux vs Mac OS)
# ######################################
# Functions and Parameters for Own Aliases
# ######################################
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
VHOME=/home/vagrant
sudo apt-get -y install curl wget unzip exuberant-ctags ack tree screen
curl -k https://gist.github.com/jaronson/6892004/raw/37e4872e85e6e2c998971ab2eca8b33e1e917e15/.vimrc -o $VHOME/.vimrc
curl -k https://gist.github.com/jaronson/6892032/raw/63d6b162f3a84396fe9ef7c0da089b8107611af7/.screenrc -o $VHOME/.screenrc
curl -k https://gist.github.com/jaronson/6903803/raw/088e95bcca30ead24bcab4f0561c618842b659e6/debian.profile -o $VHOME/.profile
curl -k https://gist.github.com/jaronson/6903796/raw/ef5f976fcff0ea50e4aa38191cb86a8ee4a1b38d/debian.bash_profile -o $VHOME/.bash_profile
curl -k https://gist.github.com/jaronson/6893402/raw/38751e33b7ab47a9175508a6e0b202d766b6de6e/debian.bashrc -o $VHOME/.bashrc
curl -k https://gist.github.com/jaronson/6903833/raw/afcb3ed0e95b302f2f95b9cabb5743698237ff07/debian.bash_aliases -o $VHOME/.bash_aliases
# Set up custom bash command prompt.
# Default is "\h:\W \u\$ ".
RED="\[\e[0;31m\]"
GREEN="\[\e[0;32m\]"
BLUE="\[\e[0;34m\]"
PLAIN="\[\e[m\]"
PS1="${RED}\u@\h: \w\$ ${PLAIN}"
# Aliases.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
---
vagrantfile-local:
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: null
memory: '512'
chosen_provider: virtualbox
network:
private_network: 192.168.56.110
@bsormagec
bsormagec / backup-cleanup.sh
Created October 23, 2015 14:36
Ubuntu Server CRON Scripts: Restart Server, Backup Databases, Backup Wordpress Site Files, Backup Cleanup, Ubuntu Server Log Rotation Schedule
#!/bin/bash
#start
#-----------------------------------------------------------------------
find /srv/backup/daily/databases/ -name '*.gz' -mtime +7 | xargs rm -f;
find /srv/backup/daily/websites/ -name '*.gz' -mtime +7 | xargs rm -f;
# Are Weekly Backups Implemented?
# find /srv/backup/weekly/ -name '*.gz' -mtime +30 | xargs rm -f;
#-----------------------------------------------------------------------
#end
<?php
/* ---------------------------------------------------------- */
/* minibots.class.php Ver.1.9g */
/* ---------------------------------------------------------- */
/* Mini Bots class is a small php class that allows you to */
/* use some free web seriveces online to retrive usefull data */
/* and infos. This version includes: */
/* smtp validation, check spelling, meteo, exchange rates, */
/* shorten urls, and geo referencing with IP address and more */
/* Feel free to use in your applications, but link my blog: */
@bsormagec
bsormagec / password.php
Created November 12, 2015 13:27
Random Readable Password.
<?php
function random_readable_pwd($length=10){
// the wordlist from which the password gets generated
// (change them as you like)
$words = 'dog,cat,sheep,sun,sky,red,ball,happy,ice,';
$words .= 'green,blue,music,movies,radio,green,turbo,';
$words .= 'mouse,computer,paper,water,fire,storm,chicken,';
$words .= 'boot,freedom,white,nice,player,small,eyes,';
$words .= 'path,kid,box,black,flower,ping,pong,smile,';
@bsormagec
bsormagec / mysql-tunnel.sh
Created January 5, 2016 15:58 — forked from index0h/mysql-tunnel.sh
mysql-tunnel.sh
#!/bin/bash
# Необходимо задать три массива: PORTS, PROXY_HOSTS и HOSTS.
# При подключении будут созданы туннели PROXY_HOSTS[id]:PORTS[id] -> HOSTS[id]:3306.
# HOSTS - массив хостов, к которым будет выполнятся ssh подключение (рекомендую использовать ssh-ключи).
PORTS=('33061')
PROXY_HOSTS=('127.0.0.1')
HOSTS=('external.host')
@bsormagec
bsormagec / nginx-latest.sh
Created January 18, 2016 11:01 — forked from Globegitter/nginx-latest.sh
Install the latest nginx from source for Ubuntu 14.04
# Automatically instal the latest nginx
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
#Make a backup copy of your current sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#Now copy the following repositories to the end of ` /etc/apt/sources.list`
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list