Skip to content

Instantly share code, notes, and snippets.

View batbayar-su's full-sized avatar

Batbayar Sukhbaatar batbayar-su

View GitHub Profile
@batbayar-su
batbayar-su / gist:8de8ad23b030c627112259ee43894249
Created August 2, 2019 03:24 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
@batbayar-su
batbayar-su / postgres-brew.md
Created January 23, 2019 06:43 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@batbayar-su
batbayar-su / mysql.database.yml
Created November 23, 2018 08:00 — forked from mmizutani/mysql.database.yml
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
# general alias
alias zshconfig="vim ~/.zshrc"
alias brewup="brew update && brew upgrade"
# git alias
alias ga="git add"
alias gb="git --no-pager branch"
alias gc="git commit"
alias gca="git commit --amend --no-edit"
alias gcm="git commit -m"
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta name="description" content="Batbayar Sukhbaatar is passionate web developer who loves to everything in the world especially web development related">
<meta name="keywords" content="Batbayar, Sukhbaatar, resume, résumé, cv">
<meta name="robots" content="index, follow">
<meta name="author" content="Batbayar">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@batbayar-su
batbayar-su / evdev.xml
Last active October 29, 2025 13:45
Mongolian Phonetic Keyboard Layout for X11 XKB
<layout>
<configItem>
<name>mp</name>
<shortDescription>mp</shortDescription>
<description>Mongolian Phonetic</description>
<languageList>
<iso639Id>mon</iso639Id>
</languageList>
</configItem>
@batbayar-su
batbayar-su / database.yml.example mysql2
Created September 28, 2017 03:51 — forked from erichurst/database.yml.example mysql2
Rails 3 database.yml examples
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
def flatten(subarr, flat = [])
subarr.each do |item|
if item.class == Array
flatten(item, flat)
else
flat << item
end
end
flat
end