Skip to content

Instantly share code, notes, and snippets.

View serkaniyigun's full-sized avatar

Serkan İyigün serkaniyigun

View GitHub Profile
@serkaniyigun
serkaniyigun / gist:0662799aeceb3861f879827ca6f4e8a0
Created April 29, 2019 08:11
Rails Project PostgreSQL to MySQL
Step 1
Make a backup copy of your data
For Rails 3, install the YAML DB gem: https://github.com/ludicast/yaml_db
For Rails 2.x install the YAML DB plugin:
@serkaniyigun
serkaniyigun / postgres-cheatsheet.md
Created January 10, 2018 10:35 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)

Keybase proof

I hereby claim:

  • I am serkaniyigun on github.
  • I am srkn (https://keybase.io/srkn) on keybase.
  • I have a public key ASDc_XAnxVp1T9G6Z05JIK9WcJ--AxnJ7a62_U77p7Sedgo

To claim this, I am signing this object:

@serkaniyigun
serkaniyigun / memorycoin-qt-patch
Last active January 2, 2016 21:29
memorycoin-qt-patch
diff --git a/memorycoin-qt.pro b/memorycoin-qt.pro
index d938c07..e1dd4ec 100644
--- a/memorycoin-qt.pro
+++ b/memorycoin-qt.pro
@@ -353,7 +353,7 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
}
isEmpty(BDB_LIB_PATH) {
- macx:BDB_LIB_PATH = /opt/local/lib/db48
+ macx:BDB_LIB_PATH = /usr/local/opt/berkeley-db4/lib
@serkaniyigun
serkaniyigun / gist:7872576
Created December 9, 2013 13:55
nginx phpmyadmin
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
@serkaniyigun
serkaniyigun / gist:7863873
Created December 8, 2013 21:12
Destroy deleted .vagrant file
VBoxManage list runningvms
VBoxManage controlvm <uuid> poweroff
VBoxManage unregistervm <uuid>
@serkaniyigun
serkaniyigun / gist:6767154
Created September 30, 2013 17:25
CSS Reset
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
@serkaniyigun
serkaniyigun / gist:6746497
Created September 28, 2013 21:00
bash_profile
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM$
eval "$(rbenv init -)"
#Fix $PATH for homebrew
homebrew=/usr/local/bin:/usr/local/sbin
export PATH=$homebrew:$PATH
@serkaniyigun
serkaniyigun / install_sublime
Created August 6, 2013 10:50
bash script install Sublime Text 2 on Linux
#!/bin/bash
# Sublime Text 2.0.2 install script
# Confirmation
echo 'Proceed with installing Sublime Text 2.0.2?'
echo '1. Yes'
echo '2. No'
echo ''
read REPLY
@serkaniyigun
serkaniyigun / SMS Gateway
Created March 17, 2013 10:18
.NET SMS Gateway Api Post cURL
public void SendSMS(string smsText, string sendTo)
{
#region Variables
string userId = ConfigurationManager.AppSettings["SMSGatewayUserID"];
string pwd = ConfigurationManager.AppSettings["SMSGatewayPassword"];
string postURL = ConfigurationManager.AppSettings["SMSGatewayPostURL"];
StringBuilder postData = new StringBuilder();
string responseMessage = string.Empty;
HttpWebRequest request = null;