Skip to content

Instantly share code, notes, and snippets.

View gencer's full-sized avatar
:octocat:
Working remotely

Gencer W. Genç gencer

:octocat:
Working remotely
View GitHub Profile
@gencer
gencer / mongodbOnDebianWSL.md
Created April 5, 2021 23:53 — forked from matinrco/mongodbOnDebianWSL.md
Install MongoDB 4.4.1 on Windows 10 WSL 2 (Debian 10/Buster - Ubuntu 20.04 LTS (Focal Fossa))
@gencer
gencer / yardoc_cheatsheet.md
Created May 28, 2020 22:40 — forked from phansch/yardoc_cheatsheet.md
Improved YARD cheatsheet
@gencer
gencer / semantic-commit-messages.md
Created February 15, 2020 11:40 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@gencer
gencer / gist:503eb29deaf11a168beed2a267496bb8
Created December 10, 2019 13:08 — forked from afair/gist:3803895
PostgreSQL and Pgpool Architecture

Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer

Thanks for stopping by!

PostgreSQL and Pgpool Architecture

@gencer
gencer / ufw.md
Created December 6, 2019 20:19 — forked from kimus/ufw.md
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@gencer
gencer / deploy.rb
Created February 5, 2019 19:18 — forked from pablopaul/deploy.rb
Notify Sentry of a new release via Capistrano with Auth Token
# This task will notify Sentry via their API[1] that you have deployed
# a new release. It uses the release timestamp as the `version`
# (like 20151113182847) and the git ref as the optional `ref` value.
#
# This task requires several environment variables be set (or just
# hardcode the values in here if you like living on the edge):
#
# ENV['SENTRY_API_ENDPOINT'] : API endpoint, https://app.getsentry.com
# ENV['SENTRY_ORG'] : the organization for this app
# ENV['SENTRY_PROJECT'] : the project for this app
@gencer
gencer / sequel_scopes.rb
Created December 18, 2018 19:10 — forked from odigity/sequel_scopes.rb
The Sequel Gem: Everything About Scopes
# (I recommend understanding the basics of this first: http://sequel.jeremyevans.net/rdoc/files/doc/object_model_rdoc.html)
# Extending the underlying dataset (http://sequel.jeremyevans.net/rdoc/files/README_rdoc.html#label-Extending+the+underlying+dataset)
# The recommended way to implement table-wide logic by defining methods on the dataset using dataset_module:
class Post < Sequel::Model
dataset_module do
def posts_with_few_comments
where{num_comments < 30}
@gencer
gencer / gpg-signing.md
Created December 7, 2018 18:54 — forked from Shinrai/gpg-signing.md
Setup GPG with only Git installed (Windows)

Preface

This gist will walk you through on how to setup GPG signing automatically through git on windows

If you have GNUPG or GPG4WIN installed you will need to uninstall them prior to following this gist.

Step 1

Locate gpg.exe {GPGBIN} {GPGBINFOLDER}

Git ONLY

Open a command line shell

@gencer
gencer / omniauth_macros.rb
Created September 4, 2018 23:34 — forked from kinopyo/omniauth_macros.rb
Integration test with Omniauth. This example is using twitter, and assume you've installed rspec and capybara. Official document is here: https://github.com/intridea/omniauth/wiki/Integration-Testing
# in spec/support/omniauth_macros.rb
module OmniauthMacros
def mock_auth_hash
# The mock_auth configuration allows you to set per-provider (or default)
# authentication hashes to return during integration testing.
OmniAuth.config.mock_auth[:twitter] = {
'provider' => 'twitter',
'uid' => '123545',
'user_info' => {
'name' => 'mockuser',
@gencer
gencer / array-to-texttable.php
Created July 6, 2018 18:19 — forked from tony-landis/array-to-texttable.php
PHP: Array to Text Table Generation Class
<?php
/**
* Array to Text Table Generation Class
*
* @author Tony Landis <tony@tonylandis.com>
* @link http://www.tonylandis.com/
* @copyright Copyright (C) 2006-2009 Tony Landis
* @license http://www.opensource.org/licenses/bsd-license.php
*/
class ArrayToTextTable