Skip to content

Instantly share code, notes, and snippets.

View mzaksana's full-sized avatar
:atom:
Mars Exploration

Muammar Zikri Aksana mzaksana

:atom:
Mars Exploration
View GitHub Profile
@revolunet
revolunet / create-wav-from-buffer.js
Last active January 29, 2022 14:01
web audio + wav buffering
/*
Goal : instantly play any wav source without download the file and without <audio/>
Idea is to use the fetch streaming API and pass raw data to web audio
My use case is playng a wav file
following http://stackoverflow.com/questions/38589614/webaudio-streaming-with-fetch-domexception-unable-to-decode-audio-data/38593356#38593356
@DrPaulBrewer
DrPaulBrewer / UploaderForGoogleDrive.js
Last active December 17, 2022 09:49
Upload Browser Blobs to Files in Google Drive API v3
// upload.js, from https://github.com/googledrive/cors-upload-sample
// Contributors Steve Bazyl, Mike Procopio, Jeffrey Posnick, Renaud Sauvain
// License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0
//
// Implements Resumable Upload for Google Drive as described by
// https://developers.google.com/drive/v3/web/resumable-upload
//
// Modified by Paul Brewer, Economic and Financial Technology Consulting LLC
// Nov. 1 2017
// 1. use Google Drive API V3 instead of V2
#!/bin/bash -v
# backing up a vm
cd /media/tim/WD6/
base="/home/tim/VirtualBox VMs"
src=win10-2018
mv $src.tar.lz4 $src.tar.lz4.old
//https://habr.com/post/213515/
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB,
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction,
baseName = "baseName",
storeName = "storeName";
function logerr(err){
console.log(err);
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active November 7, 2024 04:51
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@mzaksana
mzaksana / create_ci.php
Last active June 18, 2021 15:05
Code Igniter module generator for hmvc 3rd party
<?php
if(sizeof($argv)==1){
echo "params can't be empty\n";
echo "php create.php <function>\n";
new Help("help");
return;
}
switch ($argv[1]){
case "modules":
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Vector;
// args [0],[1] : index[row][col] for start postion !! value must be -1
// args [2],[3] : index[row][col] for goal postion !! value must be > 0
// but in test case, sometimes its not work for best minimum , see mark TODO
@mzaksana
mzaksana / prepare_to_feats.log
Created November 18, 2019 04:10
data prepare log cmd
cd ../../Program/
ls
cd controllers/
ls
cat Program.php
ls
cd /home/mza/Documents/Pro/IndoAcro/data/core/
ls
cd ..
ls
@mzaksana
mzaksana / data_amazon.py
Created November 25, 2019 08:52
Virtualization
import os
import pandas
import json
import re
from collections import OrderedDict
import plotly.graph_objects as go
import chart_studio.plotly as py
from bs4 import BeautifulSoup
import yaml
<html>
<head>
<title>Realtime Chat</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<style>
.message-bubble
{
padding: 10px 0px 10px 0px;