Skip to content

Instantly share code, notes, and snippets.

View ilopmar's full-sized avatar

Iván López ilopmar

  • VMware
  • Madrid, Spain (Remote)
  • X @ilopmar
View GitHub Profile
@ilopmar
ilopmar / telegram-mtproxy.md
Created July 2, 2024 07:56 — forked from rameerez/telegram-mtproxy.md
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.

Keybase proof

I hereby claim:

  • I am ilopmar on github.
  • I am ilopmar (https://keybase.io/ilopmar) on keybase.
  • I have a public key ASD5nf1nCSWIZcqJEYFWOu-lYbIql4gjQcahbrFDlCUz8wo

To claim this, I am signing this object:

@ilopmar
ilopmar / introrx.md
Created December 23, 2021 18:10 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ilopmar
ilopmar / gist:714ef9c36a4b62bcec79a3f4b95ffdbf
Created October 17, 2019 08:52 — forked from psayre23/gist:c30a821239f4818b0709
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
[ExifTool] ExifToolVersion : 10.80
[File:System] FileName : DSC08743.JPG
[File:System] Directory : .
[File:System] FileSize : 8.6 MB
[File:System] FileModifyDate : 2019:05:25 11:39:25+02:00
[File:System] FileAccessDate : 2019:06:03 00:32:58+02:00
[File:System] FileInodeChangeDate : 2019:06:03 00:25:59+02:00
[File:System] FilePermissions : rw-r--r--
[File] FileType : JPEG
[File] FileTypeExtension : jpg

Greach 2019 awesome list

What is this?

A compilation of all the links to slides and repositories used in workshops or shown by the speakers.

Why

It can be difficult to retrieve all that material on twitter after the conference.

Contents

// http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitted/sptests/SPTest.java
Class.forName("org.hsqldb.jdbcDriver");
conn = DriverManager.getConnection("jdbc:hsqldb:mem:sptest", "sa", "");
Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/sptests/CreateDB.sql");
ScriptRunner runner = new ScriptRunner(conn);
runner.setDelimiter("]");
runner.setLogWriter(null);
@ilopmar
ilopmar / reduce-pdf.size.sh
Last active July 1, 2018 11:48
Reduce pdf size
#!/bin/bash
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
04fc849bffb84762d5f716ca2f662c36c051a6ec908c46cd3f3cc4cac23d50e19c56b76dc2011b61b28a535b44b7e0bdd896531fe624d399cc7fe94af68084187e

External configuration in Grails 3


Working on Grails 3 I realized that I no longer can specify external configuration using the standard grails.config.locations property in Config.groovy file.

Reason is obvious! There is no Config.groovy now in Grails 3. Instead we now use application.yml to configure the properties. However, you can't specify the external configuration using this file too!

What the hack?

Now Grails 3 uses Spring's property source concept. To enable external config file to work we need to do something extra now.