- Run a service in docker-componse file
docker-compose run <service-name> <command you want to run> Ex:
docker-compose run app rails s` - One liner to stop/delete containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
- Clean docker
docker system prune
deletes that are not associated with container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to convert existing phoenix app to an umbrella app. | |
https://elixir-lang.slack.com/archives/phoenix/p1472921051000134 | |
chrismccord [10:14 PM] | |
@alanpeabody yes, it's straightforward | |
[10:14] | |
1) mix new my_umbrella --umbrella |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, FC } from 'react'; | |
import { StyleSheet, View } from 'react-native'; | |
import Animated, { | |
cancelAnimation, | |
runOnJS, | |
useAnimatedStyle, | |
useSharedValue, | |
withDelay, | |
withRepeat, | |
withTiming, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://jaketrent.com/post/pagination-headers-with-kaminari/ | |
https://developer.github.com/v3/#pagination | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => () => { | |
console.info('onStartShouldSetPanResponderCapture'); | |
return true; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FlatListDemo extends Component { | |
state = { | |
loading: false, | |
data: [], | |
page: 1, | |
seed: 1, | |
error: false, | |
} | |
componentDidMount () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FlatList | |
data={[{key: 'a'}, {key: 'b'}]} | |
renderItem={({item}) => <Text>{item.key}</Text>} | |
/> |
I hereby claim:
- I am chakrihacker on github.
- I am chakrihacker (https://keybase.io/chakrihacker) on keybase.
- I have a public key ASBxXwgW7d900MP6-K3z-mHFK1keDy2qW3yZExmOfDcDwQo
To claim this, I am signing this object: