Skip to content

Instantly share code, notes, and snippets.

Sathiyaseelan sathiyaseelan

Block or report user

Report or block sathiyaseelan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sathiyaseelan / config.yml
Created Aug 2, 2018
Sample Circle ci config to deploy a node application in heroku and run integration tests before and after release using cypress
View config.yml
# .circleci/config.yml
version: 2
defaults: &defaults
working_directory: ~/app
# the Docker image with Cypress dependencies
- image: cypress/base:8
## this enables colors in the output
TERM: xterm
sathiyaseelan / store_index.js
Created Jul 18, 2018
Nuxt Example for modularised Vuex Store with multiple nuxtServer Init
View store_index.js
export const actions = {
async nuxtServerInit ({ dispatch }, { app }) {
console.log('calling init methods')
await dispatch('providers/nuxtServerInit', { app })
await dispatch('products/nuxtServerInit', { app })
sathiyaseelan /
Created Jan 8, 2018
Using different .env files for loading environment variables.

Currently the godotenv library doesn't support loading different .env files such as .env.test for testing .env.staging for staging.

Here's the small snippet, to support different environments file dynamically. Based on the @adamcohen comment.(option 1) - Follow this issue for future changes

  1. Create a config struct as below
  2. Access the env values using the config struct
  3. Run the program with current ENVIRONMENT value set
sathiyaseelan /
Last active Dec 14, 2017
Basics to setup a golang project repo in your local

Simple Guide to setup Golang in your Mac and clone a repo.

Setup Go and workspace

Type go in terminal, to verify the installation.

  • Create a Go workspace and set GO PATH
sathiyaseelan / Elixir and Go lang
Last active Dec 3, 2017
Golang and Elixir comparision with respect to building JSON APIs
View Elixir and Go lang

Spent some time to understand go and (elixir + (phoenix)) with respect to write APIs. I’ve considered only syntax, developer productivity and features like ORM.



  1. Faster than Elixir.
  2. GORM provides similar functionality as ActiveRecord


sathiyaseelan / Responsive Spec Helpers With Meta tags
Last active Nov 29, 2017
Helpers for Responsive feature Specs in Capybara
View Responsive Spec Helpers With Meta tags
The responsive helpers are to help the developer with writing responsive specs.
All you have to do is, add `responsive_helper.rb` to the spec support directory.
And tag the specs with :mobile, :tablet for mobile and tablet size respectively.
If you don't use any tag, it would render the desktop size.
sathiyaseelan / Database cleaner configuration with multiple ORMs
Created Nov 24, 2017
Database cleaner configuration for apps using both mongoid and activerecord
View Database cleaner configuration with multiple ORMs
# Database cleaner configuration for apps using both mongoid and activerecord.
When your apps using multiple ORMs, you might want to fine tune each ORM in different way.
This contains the sample configuration for using mongoid and activerecord together.
This shows how to use different startegy for different ORMs.

Setup for Capybara selenium with headless chrome

This gist contains all you need to setup capybara for selenium with headless chrome.

  1. Add these gems to the Gemfile under test group
  gem 'capybara'
  gem 'chromedriver-helper
  gem 'selenium-webdriver'
sathiyaseelan / insert_singly_circular_ll.rb
Created Apr 2, 2017
Insert in Sorted Circular Linked List
View insert_singly_circular_ll.rb
def insert(new_node)
if tail == nil = new_node
tail = new_node
curr =
while != tail && <=
curr =
sathiyaseelan / count_set_bits.rb
Created Feb 24, 2017
Count number of set bits in a number (ruby)
View count_set_bits.rb
#Brian Kernighan’s algorithm
def count_set_bits(num)
count = 0
while num != 0
num &= (num-1)
count += 1
You can’t perform that action at this time.