Skip to content

Instantly share code, notes, and snippets.

Avatar
🌏
bertapa

Andhika Yuana andhikayuana

🌏
bertapa
View GitHub Profile
@andhikayuana
andhikayuana / images.json
Last active Apr 10, 2021
image base64 example
View images.json
[
{
"id": 1,
"image": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gKgSUNDX1BST0ZJTEUAAQEAAAKQbGNtcwQwAABtbnRyUkdCIFhZWiAH5AACAAEACwApACVhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtkZXNjAAABCAAAADhjcHJ0AAABQAAAAE53dHB0AAABkAAAABRjaGFkAAABpAAAACxyWFlaAAAB0AAAABRiWFlaAAAB5AAAABRnWFlaAAAB+AAAABRyVFJDAAACDAAAACBnVFJDAAACLAAAACBiVFJDAAACTAAAACBjaHJtAAACbAAAACRtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABwAAAAcAHMAUgBHAEIAIABiAHUAaQBsAHQALQBpAG4AAG1sdWMAAAAAAAAAAQAAAAxlblVTAAAAMgAAABwATgBvACAAYwBvAHAAeQByAGkAZwBoAHQALAAgAHUAcwBlACAAZgByAGUAZQBsAHkAAAAAWFlaIAAAAAAAAPbWAAEAAAAA0y1zZjMyAAAAAAABDEoAAAXj///zKgAAB5sAAP2H///7ov///aMAAAPYAADAlFhZWiAAAAAAAABvlAAAOO4AAAOQWFlaIAAAAAAAACSdAAAPgwAAtr5YWVogAAAAAAAAYqUAALeQAAAY3nBhcmEAAAAAAAMAAAACZmYAAPKnAAANWQAAE9AAAApbcGFyYQAAAAAAAwAAAAJmZgAA8qcAAA1ZAAAT0AAACltwYXJhAAAAAAADAAAAAmZmAADypwAADVkAABPQAAAKW2Nocm0AAAAAAAMAAAAAo9cAAFR7AABMzQAAmZoAACZmAAAPXP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8RERMWHBcTFBoVERE
@andhikayuana
andhikayuana / export.sh
Created Apr 9, 2021
export slides.com slide using decktape
View export.sh
docker run --rm -t -v `pwd`:/slides astefanutti/decktape -s 1920x1080 -p 3000 --load-pause 3000 /slides/downloadedfileslides.html outputname.pdf
@andhikayuana
andhikayuana / postman-pre-request-script-post.js
Last active Apr 8, 2021
postman prescript for generate hmac 256 signature
View postman-pre-request-script-post.js
/**
* @author andhikayuana
*/
const moment = require('moment');
function getPath(url) {
var pathRegex = /.+?\:\/\/.+?(\/.+?)(?:#|\?|$)/;
var result = url.match(pathRegex);
return result && result.length > 1 ? result[1] : '';
View jenkins-api.md

jobs

jenkins_url + /api/json?tree=jobs[name,color]

builds

jenkins_url + /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]

last build

@andhikayuana
andhikayuana / build.gradle.kts
Created Oct 20, 2020 — forked from mileskrell/build.gradle.kts
Example of declaring Android signing configs using Gradle Kotlin DSL
View build.gradle.kts
android {
signingConfigs {
getByName("debug") {
keyAlias = "debug"
keyPassword = "my debug key password"
storeFile = file("/home/miles/keystore.jks")
storePassword = "my keystore password"
}
create("release") {
keyAlias = "release"
View KategoriBukuController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\BookCategory;
class KategoriBukuController extends Controller
{
public function index(Request $request)
@andhikayuana
andhikayuana / macbook-sleep.md
Created Jul 21, 2020
sleep macbook and stop all process
View macbook-sleep.md
sudo pmset -b tcpkeepalive 0
View AppServiceProvider.php
// inside boot()
resolve(EngineManager::class)->extend('elasticsearch', function () {
return new ElasticsearchEngine(ClientBuilder::fromConfig(config('scout.elasticsearch.config')), config('scout.elasticsearch.index'));
});