Skip to content

Instantly share code, notes, and snippets.

View hkulekci's full-sized avatar
⛰️
Remote

Haydar KÜLEKCİ hkulekci

⛰️
Remote
View GitHub Profile
@IlkhamGaysin
IlkhamGaysin / postgres_in_another_pid.md
Last active March 2, 2017 06:32
postgres check running in another pid

OSX Mavericks has been crashing randomly recent to me. Just very random. Not quite good because it doesn't give it the chance for processes like Postgres, etc... to shut down properly, leaving process ids (PIDs) behind.

Now got this issue where my postgres won't boot up.

Running postgres manually doesn't work

> pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
> pg_ctl: another server might be running; trying to start server anyway
So here's a quick fix.
@sethwebster
sethwebster / GoDaddySSLHAProxy.md
Created December 29, 2015 21:29
Creating a PEM for HaProxy from GoDaddy SSL Certificate

GoDaddy SSL Certificates PEM Creation for HaProxy (Ubuntu 14.04)

1 Acquire your SSL Certificate

Generate your CSR This generates a unique private key, skip this if you already have one.

sudo openssl genrsa -out  etc/ssl/yourdomain.com/yourdomain.com.key 1024

Next generate your CSR (Certificate Signing Request), required by GoDaddy:

@ezimuel
ezimuel / test.php
Created August 10, 2015 13:29
Unit test for RouteMiddlewareTest issue #40 zend-expressive
<?php
/**
* Get the router adapters installed
*/
public function getRouterAdapters()
{
$adapters = [];
if (class_exists('Aura\Router\Router')) {
$adapters[] = [ 'Zend\Expressive\Router\Aura' ];
}
@Ocramius
Ocramius / README.md
Last active January 22, 2024 00:09
`__invoke` vs `function` vs `Closure`
@ustun
ustun / gist:5ee3250acf938e4115c6
Last active March 20, 2019 14:20
Ustun Ozgur Yazilim Is Ilani

Not: Mart 2016 itibariyle aşağıdaki ilan geçersizdir. Şu an için açık pozisyon bulunmamaktadır.

@aasokan
aasokan / es_endpoints
Created April 9, 2015 18:21
All Elasticsearch endpoints
AliasesExist HEAD /_alias/{name}
AliasesExist HEAD /{index}/_alias/{name}
Analyze GET /_analyze
Analyze GET /{index}/_analyze
Analyze POST /_analyze
Analyze POST /{index}/_analyze
Bulk POST /_bulk
Bulk POST /{index}/_bulk
Bulk POST /{index}/{type}/_bulk
Bulk PUT /_bulk
@grizzm0
grizzm0 / Foo.php
Last active August 9, 2021 14:13
Best practice form/input-filter setup for ZF3
<?php
namespace Application\Entity;
/**
* Class Foo
*
* @package Application\Entity
*/
class Foo
{
@z0mbix
z0mbix / tcpdump-es-capture
Created December 19, 2014 14:45
Capture Elasticsearch Queries
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
14:32:33.525122 IP 127.0.0.1.49777 > 127.0.0.1.9200: Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980
E...^.@.@............q#...}L...............
..#...#.GET /index/_search HTTP/1.1
Host: 127.0.0.1:9200
Accept: */*
Content-Length: 845
Content-Type: application/x-www-form-urlencoded
@drewlustro
drewlustro / KeyboardViewController.swift
Created October 21, 2014 06:40
KeyboardViewController.swift source from AppDesignVault with AutoLayout constraints fixed.
//
// KeyboardViewController.swift
// Demo Custom Keyboard
//
// Created by Drew Lustro on 10/20/14.
//
// Original derived from tutorial found on AppDesignVault
// http://www.appdesignvault.com/ios-8-custom-keyboard-extension/
//
//
@karmi
karmi / .gitignore
Last active November 12, 2022 12:11
Example Nginx configurations for Elasticsearch (https://www.elastic.co/blog/playing-http-tricks-nginx)
nginx/
!nginx/.gitkeep
!nginx/logs/.gitkeep
src/
tmp/