Skip to content

Instantly share code, notes, and snippets.

View setiawanjemy88's full-sized avatar
:octocat:
I may be slow to respond.

JEMY SETIAWAN setiawanjemy88

:octocat:
I may be slow to respond.
View GitHub Profile
@setiawanjemy88
setiawanjemy88 / Setup.md
Created February 19, 2022 12:30 — forked from txoof/Setup.md
Setup Termux on Android

Termux & Macrodroid Setup on Android

Setup termux for ssh, scripts, tasker/macrodroid integration

Install:

Note If secure Google accounts are active on the device, it is not possible to install apps from Fdroid Store

  • Install The following from the Fdroid Store:
    • Termux
    • Termux:API
  • Termux:Widget
Script started on 2021-08-21 22:12:23+09:00 [TERM="xterm-256color" TTY="/dev/pts/0" COLUMNS="93" LINES="17"]
[?2004h~ $ pkg update
[?2004l Testing the available mirrors:
[*] https://packages.termux.org/apt/termux-main: ok
[*] https://deb.kcubeterm.me/termux-main: ok
[*] https://termux.mentality.rip/termux-main: ok
[*] https://grimler.se/termux-packages-24: ok
[*] https://termux.librehat.com/apt/termux-main: ok
Picking mirror: https://grimler.se/termux-packages-24
 0% [Working] 0% [Connected to grimler.se (185.224.83.107)] [Connected to packages.termux.org (147.75.35.2 0% [Waiting for headers] [Waiting for headers] Get:1 https://grimler.se/termux-packages-24 stable InRelease [16.8 kB]
@setiawanjemy88
setiawanjemy88 / termux-pinger.md
Created February 19, 2022 12:10 — forked from gpchelkin/termux-pinger.md
Termux Bash script for checking internet connection by periodically pinging some host and showing notifications with LED and vibration when connection is lost or established

termux-pinger.sh

Termux Bash script for checking internet connection by periodically pinging some host and showing notifications with LED and vibration when connection is lost or established using termux-notification API

Requirements

  • Termux
  • Termux:API add-on
  • Execute the following commands to place script termux-pinger.sh into the home directory with the proper permissions (get the link to the raw termux-pinger.sh below):
curl -O https://gist.githubusercontent.com/gpchelkin/b18916c56ff7c759860725a28a747242/raw/b8aa96bb2c7e1dac84f854980eaeb6cd194dde4f/termux-pinger.sh
chmod +x termux-pinger.sh
# Contributor: judd <jvinet@zeroflux.org>
pkgname=alsa-lib
pkgver=1.1.7
pkgrel=2
pkgdesc="An alternative implementation of Linux sound support"
arch=('x86_64')
url="http://www.alsa-project.org"
depends=('glibc')
optdepends=('python2: for python smixer plugin')
@setiawanjemy88
setiawanjemy88 / bot.js
Created August 14, 2021 15:34 — forked from w3barsi/bot.js
const { prefix: PRE, token: TOKEN } = require('./config.json');
const discord = require('discord.js');
const mineflayer = require('mineflayer');
const client = new discord.Client();
let botList = new Map();
let channel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace AdventOfCode_Day10
{
class Program
{
@setiawanjemy88
setiawanjemy88 / telegram-bot.js
Created August 14, 2021 15:27 — forked from Sinequanonh/telegram-bot.js
Nodejs script to send Telegram push notifications
const TelegramBot = require('node-telegram-bot-api');
// replace the value below with the Telegram token you receive from @BotFather
const token = YOUR_TOKEN;
// read the doc from https://github.com/yagop/node-telegram-bot-api to know how to catch the chatId
const chatId = CHAT_ID;
const bot = new TelegramBot(token, { polling: false });
const telegrambot = (message, json) => {
//http://www.glassdoor.com/Interview/Given-a-large-input-string-write-a-function-to-check-if-it-is-a-palindrome-according-to-the-following-restrictions-low-QTN_927605.htm
//Given a large input string, write a function to check if it is a palindrome,
//according to the following restrictions: -lowercase and uppercase characters are considered equal -special characters are ignored
var aCode = "a".charCodeAt(0);
var ACode = "A".charCodeAt(0);
var setLen = 26;
function isChar(char) {
@setiawanjemy88
setiawanjemy88 / matrix-collection.twig
Last active August 13, 2021 00:35
matrix-collections
{% macro outputTiles(tileList) %}
{# use macro to keep it DRY #}
<div class="tiles">
{% for tile in tileList %}
<div class="tile">{{ tile.tileTitle }}</div>
{% endfor %}
</div>
{% endmacro %}