Skip to content

Instantly share code, notes, and snippets.

@asimzeeshan
asimzeeshan / send2Telegram
Last active September 24, 2022 02:14 — forked from AkostDev/send2Telegram
PHP function for sending message to Telegram (using cURL)
function send2Telegram($id, $msg, $token = '', $silent = false) {
$data = array(
'chat_id' => $id,
'text' => $msg,
'parse_mode' => 'html',
'disable_web_page_preview' => true,
'disable_notification' => $silent
);
if($token != '') {
$ch = curl_init('https://api.telegram.org/bot'.$token.'/sendMessage');
@asimzeeshan
asimzeeshan / ipv6_proxmox_online.net.md
Created July 19, 2023 00:50 — forked from zwindler/ipv6_proxmox_online.net.md
Configuring IPv6 block from Online.net On Proxmox Host and Guests

Configuring IPv6 block from Online.net On Proxmox Host and Guests

Following the documentation on online.net would get IPv6 to work only in a simple system installation but won't get IPv6 to work with virtualization environment (Exp. Proxmox) as It's missing some IPv6 forwards and proxies on sysctl.conf.

On Proxmox Host (Or Debian if single Debian Installation)

Enable IPv6 on the System:

  • Change Module Options to Enable IPv6:
@asimzeeshan
asimzeeshan / dockr
Created September 19, 2023 17:15 — forked from theodorosploumis/dockr
dockr - some useful docker shortcuts
#!/bin/bash
# add yourself to the docker group
# useradd -G docker USERNAME
# then you can enjoy this (for instance)
# dockr get logstash_container ip - to get the ip of the container
# or
# dockr stop last - to stop the last container you ran
# or
# dockr rmi none - to remove all <none> images
@asimzeeshan
asimzeeshan / gist:784fd6f5df59eeaba3e978a383bb2548
Created January 26, 2025 01:14 — forked from ipedrazas/gist:2c93f6e74737d1f8a791
List Docker Container Names and IPs
function drips(){
docker ps -q | xargs -n 1 docker inspect --format '{{ .NetworkSettings.IPAddress }} {{ .Name }}' | sed 's/ \// /'
}