Skip to content

Instantly share code, notes, and snippets.

View kamal-github's full-sized avatar
:octocat:
Focusing

Kamal Namdeo kamal-github

:octocat:
Focusing
View GitHub Profile
@kamal-github
kamal-github / Bear_and_Steady_Gene.cpp
Created April 10, 2016 13:51
Bear and Steady Gene (CPP program)
bool validityCheck(map<char, int> dict, int limit){
if(dict['A'] <= limit && dict['C'] <= limit && dict['G'] <= limit && dict['T'] <= limit){
return true;
}else{
return false;
}
}
int main() {
int N, maxIndex = 0, out = 999999;
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
# Path to your oh-my-zsh installation.
export ZSH=/Users/kamal/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Uncomment the following line to use case-sensitive completion.

###MYSQL We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation

To connect run: mysql -uroot

To have launchd start mysql now and restart at login: brew services start mysql Or, if you don't want/need a background service you can just run:

@kamal-github
kamal-github / iterm2-solarized.md
Created May 4, 2016 10:58 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

The Homebrew package manager includes launchctl plists to start automatically. For more information run brew info postgres.

Start manually:

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

Stop manually:

pg_ctl -D /usr/local/var/postgres stop -s -m fast

snippet art
assert_redirected_to ${1:action}: '${2:index}'
snippet artnp
assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1}, ${0:@$2})
snippet artnpp
assert_redirected_to ${1:parent}_${2:child}_path(${0:@$1})
snippet artp
assert_redirected_to ${1:model}_path(${0:@$1})
snippet artpp
assert_redirected_to ${0:model}s_path
require 'sneakers'
Sneakers.configure heartbeat: 5,
amqp: ENV['RABBITMQ_BIGWIG_URL'] || 'amqp://guest:guest@localhost:5672/order',
workers: 1,
timeout_job_after: 60,
threads: 5,
prefetch: 5,
after_fork: Proc.new { ActiveRecord::Base.establish_connection },
durable: true