Skip to content

Instantly share code, notes, and snippets.

View andhikayuana's full-sized avatar
🌏
bertapa

Andhika Yuana andhikayuana

🌏
bertapa
View GitHub Profile
@andhikayuana
andhikayuana / laravel-queue.service
Created February 20, 2020 15:19 — forked from thomasjsn/laravel-queue.service
Laravel queue worker using systemd.
# Laravel queue worker using systemd
# ----------------------------------
#
# /lib/systemd/system/queue.service
#
# run this command to enable service:
# systemctl enable queue.service
[Unit]
Description=Laravel queue worker
//
// ViewController.swift
// HitList
//
// Created by Andhika Yuana on 27/01/20.
// Copyright © 2020 Andhika Yuana. All rights reserved.
//
import UIKit
@andhikayuana
andhikayuana / postgres_queries_and_commands.sql
Created January 10, 2020 12:43 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@andhikayuana
andhikayuana / current-branch2master.md
Last active October 26, 2019 05:46
current branch to master

How to make current branch to master branch

case better_branch to master

git checkout better_branch
git merge --strategy=ours master    # keep the content of this branch, but record a merge
git checkout master
git merge better_branch 
This file has been truncated, but you can view the full file.
[
{
"message": "j6tk6nUXQztj6T4vKpEBMw1Kc3Mf7QNfzjkNPtCCKAOLuNMaP4EUcbQezTvabFz3pMIXQ1dPEcSPGciojVEAKjeJ8eTrmFEpHW54KhE89y4tTGcK3xJUV1e0axHcHmR5rGriUI4st6xCfjV6ibYrSPuAJWElRm5BduUKw3KbXTs0kuoZ4d8q3Ng1QtpKlUtZLHpwmJtPfHo7lp9sIlvaiLY7s1Ujip29LhS49dLADlPOZ21UlTIgb5ITL9AXm9qPGebN5TK7466nfhd5dS3QxjN9oCoGtnKkbKf2cuk1TlJu2IUghOiBM6QdgOhj1a8dpum76X2UdQp5rMVb7LdVh2pQsKpO8k7qtM0FwzrqSpw94qTXUv1iVvSEO7fYtrx3cYJyMo6x7RMkNKcHzeSmfoeXLoB7xP1JQ2jLUTVXvRAEj3dkU3uggwgmnzsIWFE5dAMsPwJpnJG54SptMIa4BOToOFR5vtwp6iH0Xa4Hbsj5PoYk8pElB4G8Z9ODNfHHrJ3cCsybazX71fJSqld95OK1n4coQBGBNheYt9FSSqrLrDsxoGem1DqweJXotB71DFN99JvJ7xExkiRHgzA477tiDjG3Z4LyPKZRJ5M6SoNTg6s4eqMgzSzIrgV0DPzUbJ7J0wHbk8sUHkYiO3wFNcIhIHizAIVGaWPJFig6gQOawQUaVqQWbr5oZjoBgcWDDFAKYoHAvwEkpxc8dBqW9It7fw93G128YiEYL2XPFhyKzgyE04lG39a9XU8QwN1TvMPpNidgfaLPMXnXQP5dsyQVUom31RcivUASGI4kwc9QADTGvOwZ9EupcQBJQCAUbDM2vPCpvLgim7n4KX1ISG06E6JFZ9F4LmMpt6jhEnTF5eYExCldjJAdZYqiAmTreTlRORIie2iWr54lintCnarFdLp6tQB6cU5h50HRku3RWZv6TuWpOLQ2QqJNlBlzvut6eV9286HMn71VwD90dmROSPRS8uigwxI0Qd4XgZn8awmf
@andhikayuana
andhikayuana / deploy-create-react-app-with-nginx.md
Created October 21, 2019 14:02 — forked from huangzhuolin/deploy-create-react-app-with-nginx.md
[Deploy create-react-app(react-router) with nginx] #react #nginx

Create-react-app

Create React apps with no build configuration.

Thanks to create-react-app. It's saves a lot of my time. I remember several months ago I had to setup a lot just for a react app, webpack, babel, test environment and so on... Fortunately, everything becomes easy now. Though you have many choices of start boiler plate, you worth trying this.

React router

If you are build a SPA with react, you probably use react-router.

@andhikayuana
andhikayuana / solve-gradle-timout-flutter.md
Created October 17, 2019 04:50
Flutter Gradle Timeout Issue

step 1 :

make sure you have correctly installed gradle by locating the zip file inside .grade/dist

or

more simpler way is by running choco install gradle for windows or brew install gradle for mac (choco is package manager for Windows https://chocolatey.org/ )

step 2

@andhikayuana
andhikayuana / postgresql-set-id-seq.sql
Created October 3, 2019 17:11 — forked from henriquemenezes/postgresql-set-id-seq.sql
PostgreSQL set Next ID Sequence Value to MAX(id) from Table
-- Get Max ID from table
SELECT MAX(id) FROM table;
-- Get Next ID from table
SELECT nextval('table_id_seq');
-- Set Next ID Value to MAX ID
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));
@andhikayuana
andhikayuana / README-Template.md
Created October 2, 2019 09:00 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites