Skip to content

Instantly share code, notes, and snippets.

View cihann's full-sized avatar
🎧
Focusing

Cihan Okyay cihann

🎧
Focusing
View GitHub Profile
@cihann
cihann / es.sh
Last active August 29, 2015 14:08
ubuntu 14.04 and elasticsearch 1.3.4
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.deb
sudo dpkg -i elasticsearch-1.3.2.deb
curl -L http://github.com/elasticsearch/elasticsearch-servicewrapper/tarball/master | tar -xz
sudo mkdir /usr/local/share/elasticsearch
sudo mkdir /usr/local/share/elasticsearch/bin
sudo mv *servicewrapper*/service /usr/local/share/elasticsearch/bin/
#!/bin/bash
# Location to place backups.
backup_dir="/home/postgres-backup/"
#String to append to the name of the backup files
backup_date=`date +%d-%m-%Y`
#Numbers of days you want to keep copie of your databases
number_of_days=30
databases=`psql -l -t | cut -d'|' -f1 | sed -e 's/ //g' -e '/^$/d'`
for i in $databases; do
if [ "$i" != "template0" ] && [ "$i" != "template1" ]; then
@cihann
cihann / fuar-liste.md
Last active August 29, 2015 14:09
Fuar'dan alinacaklar (2014)

Fuar Listesi

Metis

  • Bitti bitti bitmedi - Vedat Türkali
  • Büyücü - John Fowles
  • Murphy - Samuel Beckett
  • Üçleme - Samuel Beckett
@cihann
cihann / gist:7fbc71007059c59de82e
Created December 9, 2014 21:45
postgresql initial setup
$ sudo apt-get install postgresql-9.3 pgadmin3
$ sudo -u postgres psql template1
template1=# ALTER USER postgres with encrypted password 'your_password';
edit /etc/postgresql/9.3/main/pg_hba.conf:
local all postgres md5
save and restart postgres
@cihann
cihann / watch-list.md
Last active August 29, 2015 14:27
europython-and-pycon-2015-list.md

Merhaba,

Gezi.com'a JavaScript Developer arıyoruz.

Gezi.com, oteller, gezilecek yerler, restoranlar ve daha fazlası için yorumların bulunduğu bir seyahat karşılaştırma sitesidir.

Yerimiz Davutpaşa, Yıldız Teknik Üniversitesi Teknopark'ta. Metglobal bünyesi altında bir proje. Ofisimiz "açık ofis" biçiminde düzenlenmiş durumda. Harbiye, Şişli taraflarında oturanlar için servis imkanı var.

Proje eğlenceli ve öğretici. Yeni teknolojileri denemekten çekinmiyoruz, öğrenmek için kendimize zaman tanıyabiliyoruz.

" https://github.com/sontek/dotfiles/
" ==========================================================
" Dependencies - Libraries/Applications outside of vim
" ==========================================================
" Pep8 - http://pypi.python.org/pypi/pep8
" Pyflakes
" Ack
" Rake & Ruby for command-t
" nose, django-nose
@cihann
cihann / gist:2035850
Created March 14, 2012 11:20
google weather api
<?php
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=Melbourne');
$information = $xml->xpath('/xml_api_reply/weather/forecast_information');
$current = $xml->xpath("/xml_api_reply/weather/current_conditions");
$conditions = $xml->xpath("/xml_api_reply/weather/forecast_conditions");
echo $information[0]->city['data'];
echo $current[0]->temp_f['data'];
@cihann
cihann / main-requirements.txt
Created August 6, 2012 19:10
Requirements for my main python env.
Django
django-debug-toolbar==0.9.4
ipython==0.13
nose==1.1.2
@cihann
cihann / sublime2-python-django.md
Created November 3, 2012 02:34 — forked from vigo/sublime2-python-django.md
Sublime Text 2, Python + Django ve Virtualenv ile otomatik tamamlama + PEP kontrolü

Sublime Text 2, Python + Django ve Virtualenv ile otomatik tamamlama + PEP kontrolü

Gerekenler

  1. [Sublime Text 2][1]
  2. [Sublime Paket Yöneticisi][2]

Kurulum

Zaten python, virtualenv vs gibi şeylerin kurulu olduğunu varsayıyorum.