Skip to content

Instantly share code, notes, and snippets.

@royriojas
royriojas / telegram-mtproxy.md
Created March 23, 2024 22:27 — 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:
@royriojas
royriojas / _easing.scss
Created February 17, 2024 23:12 — forked from terkel/_easing.scss
Timing functions for CSS animations and transitions
// _easing.scss, CSS easing functions - gist.github.com/terkel/4377409
// Based on Caesar - matthewlein.com/ceaser
$linear: cubic-bezier( 0.250, 0.250, 0.750, 0.750 );
$ease: cubic-bezier( 0.250, 0.100, 0.250, 1.000 );
$ease-in: cubic-bezier( 0.420, 0.000, 1.000, 1.000 );
$ease-out: cubic-bezier( 0.000, 0.000, 0.580, 1.000 );
$ease-in-out: cubic-bezier( 0.420, 0.000, 0.580, 1.000 );
$ease-in-quad: cubic-bezier( 0.550, 0.085, 0.680, 0.530 );
@royriojas
royriojas / gsap-eases.css
Created January 10, 2024 03:44 — forked from jh3y/gsap-eases.css
GreenSock eases with CSS linear()
:root {
--none: linear(0, 1);
--power1-in: linear( 0, 0.0039, 0.0156, 0.0352, 0.0625, 0.0977, 0.1407, 0.1914, 0.2499, 0.3164, 0.3906 62.5%, 0.5625, 0.7656, 1 );
--power1-out: linear( 0, 0.2342, 0.4374, 0.6093 37.49%, 0.6835, 0.7499, 0.8086, 0.8593, 0.9023, 0.9375, 0.9648, 0.9844, 0.9961, 1 );
--power1-in-out: linear( 0, 0.0027, 0.0106 7.29%, 0.0425, 0.0957, 0.1701 29.16%, 0.2477, 0.3401 41.23%, 0.5982 55.18%, 0.7044 61.56%, 0.7987, 0.875 75%, 0.9297, 0.9687, 0.9922, 1 );
--power2-in: linear( 0, 0.0014 11.11%, 0.0071 19.24%, 0.0188 26.6%, 0.037 33.33%, 0.0634 39.87%, 0.0978 46.07%, 0.1407 52.02%, 0.1925 57.74%, 0.2559 63.49%, 0.3295 69.07%, 0.4135 74.5%, 0.5083 79.81%, 0.6141 85%, 0.7312 90.09%, 1 );
--power2-out: linear( 0, 0.2688 9.91%, 0.3859 15%, 0.4917 20.19%, 0.5865 25.5%, 0.6705 30.93%, 0.7441 36.51%, 0.8075 42.26%, 0.8593 47.98%, 0.9022 53.93%, 0.9366 60.13%, 0.963 66.67%, 0.9812 73.4%, 0.9929 80.76%, 0.9986 88.89%, 1 );
--power2-in-out: linear( 0, 0.0036 9.62%, 0.0185 16.66
@royriojas
royriojas / no-ssh-password-mac.txt
Created October 10, 2022 07:10 — forked from eegrok/no-ssh-password-mac.txt
disable password ssh authentication on mac os
make sure the following lines are set in /etc/sshd_config (or /etc/ssh/sshd_config on ubuntu)
(they all exist already, but are commented, some may have a value of yes)
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM no
then restart the ssh server (uncheck / recheck 'Remote Login' in the 'System Preferences' -> 'Sharing' panel)
@royriojas
royriojas / cloudSettings
Created April 5, 2020 20:45 — forked from MisaelRiojas/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-12-01T18:40:07.609Z","extensionVersion":"v3.2.2"}
const React = require('react');
const dynamics = require('dynamics.js');
/**
* Using dynamics.js to transition things or just animate
* ------------------------------------------------------
* props:
* - runTo enum("start", "finish) - which way to run.
* - onComplete callback
* - onChange callback
@royriojas
royriojas / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/bin/bash
echo "===> install memcached.so in OSX Mavericks"
HAVE_PEAR=$(which pear)
if [[ $HAVE_PEAR == "" ]] ; then
echo '===> no pear found'
echo '===> trying to install it...'
@royriojas
royriojas / install.apc.sh
Last active December 14, 2016 02:29 — forked from ryanjbonnell/gist:4074061
Install apc on mac os X. Works in Mavericks!
#!/bin/bash
echo '===> install apc.so in OSX Mavericks'
mkdir -p ~/tmp/apc-deps
# Compile PCRE - Perl Compatible Regular Expressions
cd ~/tmp/apc-deps
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.33.tar.gz
tar -xvzf pcre-8.33.tar.gz