Skip to content

Instantly share code, notes, and snippets.

View gtrabanco's full-sized avatar
:octocat:

Gabriel Trabanco gtrabanco

:octocat:
View GitHub Profile
@rameerez
rameerez / telegram-mtproxy.md
Last active April 25, 2024 18:13
Telegram Proxy How-To: complete and up-to-date MTProxy tutorial

How to set up a Telegram Proxy (MTProxy)

This tutorial will teach you how to set up a Telegram MTProxy on an Ubuntu 22.04 sever using AWS Lightsail, although you can use any other Linux distribution and cloud provider.

Using a Telegram proxy is a safe, easy and effective way of overcoming Telegram bans. It's useful, for example, to keep using Telegram under tyrannical regimes, or to circumvent judges' decisions to block Telegram.

Telegram proxies are a built-in feature in all Telegram apps (both mobile and desktop). It allows Telegram users to connect to a proxy in just one or two clicks / taps.

Telegram proxies are safe: Telegram sends messages using their own MTProto secure protocol, and the proxy can only see encrypted traffic – there's no way for a proxy to decrypt the traffic and read the messages. The proxy does not even know which Telegram users are using the proxy, all the proxy sees is just a list of IPs.

@NathanaelA
NathanaelA / svelte-loader.mjs
Last active October 21, 2023 02:28
Svelte Node.JS loader
// (c) 2021-2022, Nathanael Anderson @ Master Technology
// License: MIT
// Please NOTE the compiler settings on Line 49 & 89 is VERY VERY specific to my use case,
// the compiler OPTIONS probably will be different for your a normal use case.
// Flags
const DEBUGGING = false;
import { writeFileSync } from 'node:fs';
@cdbailey
cdbailey / gist:b796b6379f52b393c63a0d39bb13ab02
Last active April 26, 2021 22:27
UDM PRO Backup to NFS Script
#!/bin/bash
# /volume1/UDMBackup is the path to the NFS share on the Synology
# /nfs/UDMBackup is the mount point on the local Linux server where the script runs
# /opt/scripts/UDM_pass is a text file containing the root account password on the UDM
# I run this script on an Ubuntu VM for ease of maintenance and save the backups on a Synology using NFS
LOGFILE="/opt/scripts/udmpro-backup.log"
BKUPSCRIPT="sshpass -f /opt/scripts/UDM_pass scp -o StrictHostKeyChecking=no -r root@<<UDM PRO IP ADDRESS>>:/mnt/data/unifi-os/unifi/data/backup/autobackup/* /nfs/UDMBackup"
mount <<SYNOLOGY IP ADDRESS>>:/volume1/UDMBackup /nfs/UDMBackup
@nuria-fl
nuria-fl / country-emoji.js
Created August 21, 2020 08:51
Country emojis
const countryList = [
{
name: 'Afghanistan',
emoji: '🇦🇫',
},
{
name: 'Åland Islands',
emoji: '🇦🇽',
},
{
@aitoraznar
aitoraznar / gist:2ba568696ad7f95049d7e40d4c56e072
Created January 22, 2020 11:35
Highlight HTML elements with CSS snippet
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }
* * * * * * * { background-color: rgba(255,0,0,.2); }
* * * * * * * * { background-color: rgba(0,255,0,.2); }
* * * * * * * * * { background-color: rgba(0,0,255,.2); }
@dishuostec
dishuostec / deploy_wildcards.sh
Last active December 8, 2020 19:43
synology dsm 6.2 deploy wildcard certs
#!/bin/bash
WORKING_DIR=/usr/syno/etc/certificate
ARCHIVE_DIR=${WORKING_DIR}/_archive
INFO=`cat ${ARCHIVE_DIR}/INFO`
KEYS=`echo $INFO | jq -r 'keys_unsorted|.[]'`
for key in ${KEYS}; do
SERVICES=`echo $INFO | jq -r --arg key ${key} '.[$key].services | .[] | [.subscriber, .service] | join("/")'`
@webframp
webframp / zsh_to_fish.py
Created September 4, 2018 22:11 — forked from dvdbng/zsh_to_fish.py
Migrate zsh history to fish
import os
import re
def zsh_to_fish(cmd):
return (cmd.replace('&&', '; and ')
.replace('||', '; or '))
def is_valid_fish(cmd):
@markuskreitzer
markuskreitzer / README.md
Created July 30, 2018 16:15
How to connect a Raspberry Pi to a WPA2 Enterprise Network

How to connect a Raspberry Pi to a WPA2 Enterprise Network

tags: Auburn, Auburn University, WPA2, WPA2 Enterprise

Auburn University is gracious enough to provide instructions to Ubuntu users on how to connect their hosts to the Auburn University WiFi Network.

Many Universities use WPA2 Enterprise authentication on their networks. This allow you to track WHO is connected where and have granular control over who's able to access the WiFi network.

For tinkerers and experimenters with Raspberry Pi, Particle Photon, and other embedded systems, this poses a problem because many simplier IoT devices do not support WPA2 Enterprise natively or not without some hassle.

Raspbian Jesse and earlier will display a WPA2 Enterprise network from its dropdown list, but it will be greyed out. The workaround is to manually connect to it:

@cliffrowley
cliffrowley / STREAMDECK_HID.md
Last active May 7, 2024 00:09
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

@TheCureliestWalk
TheCureliestWalk / signed-gpg-github.md
Last active July 9, 2021 10:12
How to create GPG Signed key with Keybase on Github

Sign GPG Key on Github with Keybase

mrkdwn-pass

Set everything up

  • Linux Computer (Windows or MacOS is compatible but you need to install GIT manually)
  • You need to install Keybase, login or sign up one if you don't have.
  • Your basic skill with Git and Github:

You need to know that Linux are have a default software: gpg for sign the GPG key. but we are going to use Keybase instead.