Skip to content

Instantly share code, notes, and snippets.

View mustafaturan's full-sized avatar

Mustafa Turan mustafaturan

View GitHub Profile
@mustafaturan
mustafaturan / rbenv-setup.sh
Last active March 2, 2016 00:22
rbenv centos setup
#!/usr/bin/env bash
# repository
#cd /tmp
#wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#rpm -Uvh epel-release-6-8.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel
; Start a new pool named 'www'.
[www]
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
@mustafaturan
mustafaturan / iptables
Created October 23, 2012 23:23
iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
@mustafaturan
mustafaturan / latest-ffmpeg-centos6.sh
Last active October 25, 2022 20:14
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
@mustafaturan
mustafaturan / ruby.2.6.3-setup.sh
Last active February 2, 2023 10:08
ruby 2.6.3 setup for centos 6.x
#!/usr/bin/env bash
# repository
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick
@mustafaturan
mustafaturan / redis-setup.sh
Last active August 29, 2015 14:13
redis setup
#!/usr/bin/env bash
cd /usr/local/src
version=2.8.19
wget http://download.redis.io/releases/redis-$version.tar.gz
tar xzf redis-$version.tar.gz
cd redis-$version
make
@mustafaturan
mustafaturan / gitignore
Created January 16, 2015 20:38
remove gitignored files
# remove gitignored files
git rm . -r --cached
git add .
git commit -m "fixed untracked files"
@mustafaturan
mustafaturan / linked_list_stack_impl.rb
Last active June 8, 2021 21:07
Ruby Stack Implementation With Linked List
# Mustafa Turan
# coded at 30.11.2015 with NO LICENSE
# Feel free to use/modify/distribute/reimplement
# node.rb
class Node
attr_accessor :node_ref
attr_reader :val
def initialize(node_ref, val)
@mustafaturan
mustafaturan / Procfile
Last active July 2, 2018 18:20
Configurations for Phoenix Framework 'Deploy To Heroku' button
web: MIX_ENV=prod mix phoenix.server
@mustafaturan
mustafaturan / cerficate-fetcher.sh
Created February 28, 2017 00:46
Fetch Certificate From A Web Page
#!/usr/bin/env bash
openssl s_client -connect {hostname}:{port} -showcerts