Skip to content

Instantly share code, notes, and snippets.

View chakrihacker's full-sized avatar

Subramanya Chakravarthy chakrihacker

View GitHub Profile
chakrihacker / phoenix_to_umbrella
Created October 3, 2021 07:44 — forked from emilsoman/phoenix_to_umbrella
How to move an existing phoenix app under an umbrella app
View phoenix_to_umbrella
How to convert existing phoenix app to an umbrella app.
chrismccord [10:14 PM]
@alanpeabody yes, it's straightforward
1) mix new my_umbrella --umbrella
View Confetti.tsx
import React, { useEffect, FC } from 'react';
import { StyleSheet, View } from 'react-native';
import Animated, {
chakrihacker /
Last active February 28, 2020 16:18
List of docker commads and technical terms explanation

Docker Compose

  1. Run a service in docker-componse file docker-compose run <service-name> <command you want to run> Ex: docker-compose run app rails s`
  2. One liner to stop/delete containers docker stop $(docker ps -a -q) docker rm $(docker ps -a -q)
  3. Clean docker docker system prune deletes that are not associated with container
chakrihacker / gist:21750c87c751c4c40f7ef384fb698be6
Created February 22, 2020 20:08 — forked from austra/gist:d8f5a1de00f12c253716
Pagination Headers With Kaminari for API
View gist:21750c87c751c4c40f7ef384fb698be6
Kaminari provides easy pagination in a rails app. It’s great to use. We’ll make it better by adding a little function to your controllers to provide useful pagination headers.
kaminari pagination
Pagination from Kaminari
View gist:9443149431ac79460d135d9d76bacced

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

chakrihacker / PanResponder_Overview.js
Created August 16, 2019 15:01 — forked from teameh/PanResponder_Overview.js
React native PanResponder interface overview
View PanResponder_Overview.js
this._panResponder = PanResponder.create({
// ----------- NEGOTIATION:
// A view can become the touch responder by implementing the correct negotiation methods.
// Should child views be prevented from becoming responder on first touch?
onStartShouldSetPanResponderCapture: (evt, gestureState) => () => {'onStartShouldSetPanResponderCapture');
return true;
chakrihacker / flatlist.jsx
Created October 7, 2018 14:51
FlatList with some data
View flatlist.jsx
class FlatListDemo extends Component {
state = {
loading: false,
data: [],
page: 1,
seed: 1,
error: false,
componentDidMount () {
chakrihacker / basic-flatlist.jsx
Last active October 7, 2018 14:50
FlatList basic
View basic-flatlist.jsx
data={[{key: 'a'}, {key: 'b'}]}
renderItem={({item}) => <Text>{item.key}</Text>}

Keybase proof

I hereby claim:

  • I am chakrihacker on github.
  • I am chakrihacker ( on keybase.
  • I have a public key ASBxXwgW7d900MP6-K3z-mHFK1keDy2qW3yZExmOfDcDwQo

To claim this, I am signing this object: