Skip to content

Instantly share code, notes, and snippets.

View banghasan's full-sized avatar

Hasanudin H Syafaat banghasan

View GitHub Profile
@banghasan
banghasan / netspeed-xfce.txt
Created December 1, 2021 03:10
netspeed xfce
1. Download
https://code.google.com/archive/p/xfce4-netspeed-plugin/downloads
```sh
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xfce4-netspeed-plugin/xfce4-netspeed-plugin-0.3.1.tar.gz
tar -zxvf
cd xfce4-netspeed-plugin
```
@banghasan
banghasan / lumpia-deeplink-refferal.js
Last active August 20, 2023 13:31
Lumpia dan Refferal Deeplink
@banghasan
banghasan / lumpia-regex.js
Created November 5, 2021 09:26
Lumpia dan Regex
/*
artinya ini adalah komentar, tidak diproses oleh GAS
MATERI Belajar REGEX dengan LUMPIA
pola regex : /pola/flag
*/
/*
@banghasan
banghasan / tbl.sh
Created March 17, 2020 10:48
Telegram Bash Launcher
#!/bin/bash
# ganti ke path dan aplikasinya Telegram
telegram=/home/banghasan/data/Download/Telegram/Telegram/Telegram
# info program:
program="TBL"
desc="Telegram Bash Launcher"
versi=1.0
release="17 Maret 2020"
@banghasan
banghasan / tmux.cheat
Created February 1, 2018 10:53 — forked from ellerbrock/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@banghasan
banghasan / color.php
Created January 25, 2018 03:59
php color cli
<?php
// from http://www.if-not-true-then-false.com/2010/php-class-for-coloring-php-command-line-cli-scripts-output-php-output-colorizing-using-bash-shell-colors/
class Colors {
private $foreground_colors = array();
private $background_colors = array();
public function __construct() {
// Set up shell colors
$this->foreground_colors['black'] = '0;30';
$this->foreground_colors['dark_gray'] = '1;30';
$this->foreground_colors['blue'] = '0;34';
@banghasan
banghasan / SoftEther.sh
Created October 5, 2017 13:28
Ubuntu 16.04 SoftEther
#!/bin/bash
read -r -p "This will install SoftEther to your server. Are you sure you want to continue? [y/N] " response
case $response in
[yY][eE][sS]|[yY])
echo "Updating the system first..."
apt-get update
apt-get upgrade
apt-get install checkinstall build-essential
echo "Downloading last stable release: 4.20"
sleep 2
@banghasan
banghasan / hookio.txt
Last active April 25, 2017 11:41
hookio.php
$tokenbot = $Hook['env']['tokenbot'];
$endpoint = "https://api.telegram.org/bot$tokenbot/";
$messages = $Hook["params"];
if (isset($messages['message'])) {
$messages = $messages['message'];
} else {
echo 'URL hook.io: https://'.$Hook['input']['host'].$Hook['input']['path'];
}
@banghasan
banghasan / ssh-telegram.sh
Created October 27, 2016 05:39
Peringatan Jika Login SSH ke Telegram
# simpan file ke /etc/profile.d/
USERID="ID USER atau GROUP" #contoh 213567634
KEY="TOKENBOT" #contoh 123456789:AASDFASDW21casgW4hjtRLp4GH5wMnWlpT7Eg
TIMEOUT="10"
URL="https://api.telegram.org/bot$KEY/sendMessage"
DATE_EXEC="$(date "+%d %b %Y %H:%M")"
TMPFILE='/tmp/ipinfo-$DATE_EXEC.txt'
if [ -n "$SSH_CLIENT" ]; then
IP=$(echo $SSH_CLIENT | awk '{print $1}')
PORT=$(echo $SSH_CLIENT | awk '{print $3}')
/*
* setWebhook:
* curl -X POST https://api.telegram.org/botXXXXXXX/setWebhook -F url="SERVER_URL" -F certificate=@/etc/nginx/ssl/YOURPUBLIC.pem
*
* upload foto
* $postFields = array('chat_id' => $chatId, 'photo' => new CURLFile(realpath("image.png")), 'caption' => $text);
*/