Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

A. A. Sumitro aasumitro

🎯
Focusing
View GitHub Profile
@aasumitro
aasumitro / gitignore_per_git_branch.md
Created Apr 27, 2020 — forked from wizioo/gitignore_per_git_branch.md
HowTo have specific .gitignore for each git branch
View gitignore_per_git_branch.md

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

View Checklist Keamanan API
# Checklist Keamanan API
Checklist penanggulangan keamanan yang paling penting ketika merancang, menguji, dan melepaskan API ke khalayak
---
## Autentikasi
- [ ] Jangan gunakan `Basic Auth`. Gunakan autentikasi baku (Contoh: JWT, Oauth).
- [ ] Gunakan mekanisme baku untuk `autentikasi`, `pembuatan token`, dan `penyimpanan kata sandi`.
View vscode.config
{
"editor.renderControlCharacters": false,
"editor.renderWhitespace": "none",
"editor.fontSize": 18,
"editor.lineHeight": 24,
"editor.wordWrap": "on",
"editor.detectIndentation": false,
"editor.minimap.enabled": false,
"editor.rulers": [
@aasumitro
aasumitro / array_find_manual.php
Created Apr 2, 2020
manual input array find value
View array_find_manual.php
#include <stdio.h>
int main()
{
int arr_size, arr_input, find;
printf("\n Please size of the array : ");
scanf("%d", &arr_size);
int arr[arr_size] = {};
@aasumitro
aasumitro / array_find.cpp
Created Apr 2, 2020
find duplicate array with c
View array_find.cpp
#include <stdio.h>
int main()
{
int input;
int arr[] = {2,3,6,1,7,9,7,3,5,7,2,5,8,5};
int output = 0;
printf("\n Please Enter Number of elements in an array : ");
scanf("%d", &input);
View jwt-refresh-token-middleware.php
public function handle($request, Closure $next)
{
try
{
if (! $user = JWTAuth::parseToken()->authenticate() )
{
return response()->json([
'code' => 101 // means auth error in the api,
'response' => null // nothing to show
]);
View CKAN API references
CKAN API DATA
- organization list in detail (load at organization on client)
http://portaldata.sulutprov.go.id/api/3/action/organization_list?all_fields=true
@aasumitro
aasumitro / array_add.cpp
Created Feb 23, 2020
add value to an array C
View array_add.cpp
#include <stdio.h>
int main() {
// init array
int arr[10] = {18, 27, 24, 33, 72, 0, 0, 0, 0, 0};
// declare var
int i, number;
// print array list
printf("Array of Number\n");
@aasumitro
aasumitro / default
Created Feb 17, 2020
multiple subdir nginx config
View default
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/html;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
You can’t perform that action at this time.