Skip to content

Instantly share code, notes, and snippets.

View rocammo's full-sized avatar
🎯
Focusing

Rodrigo Casamayor rocammo

🎯
Focusing
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.

@gjreasoner
gjreasoner / README.md
Last active April 25, 2024 01:42
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
@qoomon
qoomon / conventional_commit_messages.md
Last active May 2, 2024 09:52
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@haircut
haircut / Install PIP to user site on macOS.md
Created August 29, 2017 21:50
How to install and use pip without sudo or admin on macOS

Install and use pip on macOS without sudo / admin access

Most recently tested on macOS Sierra (10.12.6)

  1. Download the installation script; curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py
  2. Run the installation, appending the --user flag; python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip
  3. Make sure ~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.
  4. Use pip! Remember to append --user when installing modules; ie. pip install <package_name> --user

Note

@DavidSanf0rd
DavidSanf0rd / KotlinReflection.kt
Created June 20, 2017 00:39
Using kotlin reflection to get the name, type and values of any class properties
import kotlin.reflect.full.declaredMemberProperties
/**
* Created by sanf0rd on 19/06/17.
*/
fun readProperties(instance: Any) {
val clazz = instance.javaClass.kotlin
clazz.declaredMemberProperties.forEach {
println("${it.name} --[${it.returnType}]---> ${it.get(instance)}")
// get accounts
web3.eth.accounts
// get reference to deployed contract
var metaCoin;
MetaCoin.deployed().then(function(deployed) {metaCoin = deployed;});
// get balance of account 0
metaCoin.getBalance.call(web3.eth.accounts[0])
@bkaradzic
bkaradzic / orthodoxc++.md
Last active April 23, 2024 13:59
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@l0ki000
l0ki000 / csd-wrapper.sh
Last active January 19, 2024 11:56 — forked from zer4tul/gist:6477470
Cisco Anyconnect CSD wrapper for OpenConnect (exhanced to autodownload and autoupdate hostscan)
#!/bin/bash
# Cisco Anyconnect CSD wrapper for OpenConnect
# Enter your vpn host here
CSD_HOSTNAME=
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@vaiorabbit
vaiorabbit / Building libglfw.dylib on macOS (Apple Silicon)
Last active September 8, 2022 13:10
Building libglfw.dylib on macOS (Apple Silicon)
$ curl -L https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.zip > glfw-3.3.2.zip
$ unzip glfw-3.3.2.zip
$ cd glfw-3.3.2/
$ mkdir build
$ cd build
$ export MACOSX_DEPLOYMENT_TARGET=10.14
$ cmake -D CMAKE_BUILD_TYPE=Release -D GLFW_NATIVE_API=1 -D CMAKE_OSX_ARCHITECTURES="x86_64;arm64" -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=clang ../
$ make
$ ls -l src/libglfw*