Skip to content

Instantly share code, notes, and snippets.

View anak10thn's full-sized avatar
🌴
Maaf gak di rumah

Ibnu Yahya (Eka) anak10thn

🌴
Maaf gak di rumah
View GitHub Profile
@anak10thn
anak10thn / download_file.rs
Created September 14, 2022 02:59 — forked from giuliano-macedo/download_file.rs
Download large files in rust with progress bar using reqwest, future_util and indicatif
// you need this in your cargo.toml
// reqwest = { version = "0.11.3", features = ["stream"] }
// futures-util = "0.3.14"
// indicatif = "0.15.0"
use std::cmp::min;
use std::fs::File;
use std::io::Write;
use reqwest::Client;
use indicatif::{ProgressBar, ProgressStyle};
@anak10thn
anak10thn / React-Native-WebView-Cookies.js
Created September 5, 2022 01:38 — forked from kanzitelli/React-Native-WebView-Cookies.js
React Native Trick: Get Cookies of WebView without using any native modules such as react-native-cookies. Might be helpful for getting JWT while making OAuth2 👽
// @flow
import React, { Component } from 'react';
import {
WebView,
} from 'react-native';
class LoginScreen extends Component {
state = {
cookies : {},
@anak10thn
anak10thn / email.go
Created July 30, 2022 07:46 — forked from carelvwyk/email.go
Building an email in Golang to be delivered using Amazon SES
func buildEmailInput(source, destination, subject, message string,
csvFile []byte) (*ses.SendRawEmailInput, error) {
buf := new(bytes.Buffer)
writer := multipart.NewWriter(buf)
// email main header:
h := make(textproto.MIMEHeader)
h.Set("From", source)
@anak10thn
anak10thn / recompile-and-run.sh
Created March 9, 2020 23:45 — forked from PuKoren/recompile-and-run.sh
Recompile APK + Sign with apktool
# You must first install apktool (https://github.com/iBotPeaches/Apktool) and android SDK
# and decompile apk using it
# apktool d -rf my-app.apk
# then generate a key for sign in:
# keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
rm signed-app.apk
apktool b -f -d com.myapp
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore com.myapp/dist/com.myapp.apk alias_name
zipalign -v 4 com.myapp/dist/com.myapp.apk signed-app.apk
@anak10thn
anak10thn / docker-compose.yaml
Created March 4, 2020 12:30 — forked from ayubmalik/docker-compose.yaml
Kafka REST proxy with Docker compose. Everything required to get Confluent REST proxy docker images working so you can post messages to consumers with curl etc
---
version: '3.5'
networks:
default:
name: kafka-net
services:
zookeeper:
image: confluentinc/cp-zookeeper:4.1.1
hostname: zookeeper
#!/bin/zsh
alias dos="toilet -f mono12 -F metal -t"
alias dosg="toilet -f mono12 -F gay -t"
clear
echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";
dos "Apa yang kau";dosg "harap di bumi...."
sleep 2.5
clear
@anak10thn
anak10thn / create_docker_compose_basic_auth_string_for_traefik.sh
Created November 30, 2019 02:25 — forked from TechupBusiness/create_docker_compose_basic_auth_string_for_traefik.sh
Generator to create basic authentication string for traefik (docker-compose.yml and .env)
#!/bin/bash
SUDO=''
if (( $EUID != 0 )); then SUDO='sudo'; fi
echo "Basic auth for traefik >= v1.7"
read -p "User: " USER
read -p "Password: " PW
# Checks if htpasswd is available or install it otherwise

KNOT AGENT JSON PARAMETER DOCS AGENT MENGGUNAKAN LIBKNOT

Semua parameter agent json sama dengan parameter LIBKNOT

PENJELASAN

perhatikan json berikut ini :

{
 "command-set": {
//http://openaudio.blogspot.com/2016/10/teensy-audio-over-usb.html
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputUSB usb1; //xy=70,155
AudioFilterBiquad biquad1; //xy=198,227
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Memory-aware LRU Cache function decorator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A modification of the builtin ``functools.lru_cache`` decorator that takes an
additional keyword argument, ``use_memory_up_to``. The cache is considered full
if there are fewer than ``use_memory_up_to`` bytes of memory available.