Skip to content

Instantly share code, notes, and snippets.

View andrisasuke's full-sized avatar

Andri Sasuke andrisasuke

View GitHub Profile

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

@andrisasuke
andrisasuke / docker-rm-images.md
Created April 3, 2019 11:05 — forked from alferov/docker-rm-images.md
Remove all (untagged) images and containers from Docker
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")

References:

FORMAT: 1A
HOST: http://gibby.stagingapps.net/api
# Gibby API
The Gibby API provides endpoints for external users
## Glossary
- API Key: API Key are random strings that give consumer access to the APIS
CREATE TABLE room_messages (
id serial NOT NULL,
room_name varchar(255) NOT NULL,
request_id INT NOT NULL,
requester_id INT NOT NULL,
traveller_id INT NOT NULL,
active BOOLEAN NOT NULL DEFAULT TRUE ,
created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL,
updated_at TIMESTAMP(0) WITHOUT TIME ZONE,
CONSTRAINT room_messages_pk PRIMARY KEY (id),
@andrisasuke
andrisasuke / push_rabbit_mq
Last active December 5, 2017 09:38
list of push notification to rabitMq
request offer posted : to requester yg membuat order
from api : requests/{request_id}/offers [POST]
{
"push_token" :[ "$push_token_requester_1"],
"type": "REQUEST_OFFER",
"request_id": 1,
"offer_id": 1,
"text": "$traveller_name give offer $offer_price for your request $item_name"
"device": "android" / "ios" berdasarkan app_id yg ada ditable user_devices
}
@andrisasuke
andrisasuke / get_firebase_token.txt
Created December 4, 2017 06:34
Get firebase_token
public class OyFirebaseInstanceIdService extends FirebaseInstanceIdService {
private static final String TAG = "OyFirebaseIis";
@Inject
LocalPreferences localPreferences;
private CompositeSubscription subscriptions;
@Override
{
"id": 46,
"request_by": "andrioy",
"user": {
"id": 40,
"user": "andrioy",
"name": "andri oy",
"images": {
"original": "https://gibby.id/uploads/users/40/1509587093648523883.jpg",
"normal": "https://gibby.id/uploads/users/40/1509587093648523883_normal.jpg",
http://gibby.id/api/requests-offer/{request_id}/trip/{trip_id}?api_key=198bc4240396814a3c8fb73b52b451b0
{
"data" : {
"request_id": 1,
"has_offered": true, // false if blom pernah offer
"price" : 2000,
"gibby_fee" : 500,
"gibby_prosen" : 1700,
"price_to_pay" : 70000,
{
"data": [
{
"id": 8,
"from_country_id": 101,
"from_country": "Indonesia",
"image": {
"original": "https://gibby.id/uploads/countries/101/14955144531007008508.jpg",
"@3x": "https://gibby.id/uploads/countries/101/14955144531007008508_@3x.jpg",
"@2x": "https://gibby.id/uploads/countries/101/14955144531007008508_@2x.jpg",
@andrisasuke
andrisasuke / src.txt
Created July 13, 2017 05:11
pip install psycopg2 on mac os x
$ export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/VERSION/bin/
$ pip install psycopg2