Skip to content

Instantly share code, notes, and snippets.

@CamonZ
CamonZ / telegram-mtproxy.md
Created March 23, 2024 23:57 — forked from rameerez/telegram-mtproxy.md
Up-to-date tutorial on how to set a Telegram MTProxy on an Ubuntu 22.04 sever using AWS Lightsail

How to set up a Telegram Proxy

This uses the native built-in proxy feature in the Telegram app.

The problem is the README in the official TelegramMessenger/MTProxy repo is outdated and fails at multiple points if you try following the steps described. Here's an updated version as of March 2024.

Instructions

  1. Launch a clean Ubuntu 22.04 instance. I'm using AWS Lightsail. ssh into the machine:

Keybase proof

I hereby claim:

  • I am camonz on github.
  • I am camonz (https://keybase.io/camonz) on keybase.
  • I have a public key ASBQvTQuMhsb-nHn_IT5mNa1Sf4HGehLejh3pqp3mhzk3Qo

To claim this, I am signing this object:

@CamonZ
CamonZ / broker.drl
Created April 26, 2018 17:56 — forked from johndemic/broker.drl
Mule Drools CEP Example
package org.drools.examples.broker
import org.mule.MessageExchangePattern;
import org.mule.example.cep.Company
import org.mule.example.cep.StockTick
global org.mule.module.bpm.MessageService mule;
# default dialect for the semantic code will be MVEL
dialect "mvel"
@CamonZ
CamonZ / dust.py
Created January 22, 2018 03:25 — forked from anfederico/dust.py
Get rid of dust on your Binance account
# pip install python-binance
from binance.client import Client
client = Client(api_key, api_secret)
DUST = 0.001 # BTC
account = client.get_account()
prices = client.get_all_tickers()
1. Download CSV with rasters you want from USGS.
2. Convert CSV to JSON with something like http://www.csvjson.com/
3. Run script with `ruby usgs_downloader.rb path_to_json_file`
4. Sit back.
5. ???
6. Receive slope analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CamonZ
CamonZ / rename-component.md
Created October 6, 2016 18:07 — forked from paridin/rename-component.md
Ember rename component, shell helper

Rename a component file.

I made a mistake to naming some components, I don't want to erase it and create again, the problem is, I need to rename the files by hand, it's a boring task, and maybe in the future I will get the same issue, to make me the life easier I developed the following snippet, you should use it if you have the same problem.

The snippet

#!/usr/bin/env bash
# purpose: rename files, in same path
@CamonZ
CamonZ / README.md
Last active August 29, 2015 14:11 — forked from mbostock/.block
@CamonZ
CamonZ / multisort-omp-leaf.c
Created December 4, 2013 15:03
Recursive paralelized code for multisort using leaf and tree paralelization strategies
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#if _EXTRAE_
#include "extrae_user_events.h"
#endif
#if _TAREADOR_
#include <tareador_hooks.h>
#endif
@CamonZ
CamonZ / selector.rb
Created November 23, 2012 13:09
HTML::Selector
def has_an_nth_child_match?(statement, values, pseudo)
# Nth-child including last and of-type.
res = statement.sub!(/^:nth-(last-)?(child|of-type)\((odd|even|(\d+|\?)|(-?\d*|\?)?n([+\-]\d+|\?)?)\)/) do |match|
reverse = $1 == "last-"
of_type = $2 == "of-type"
@source << ":nth-#{$1}#{$2}("
case $3
when "odd"
pseudo << nth_child(2, 1, of_type, reverse)
@source << "odd)"