Skip to content

Instantly share code, notes, and snippets.

View luisxkimo's full-sized avatar
🏠
Working from home

luisxkimo

🏠
Working from home
View GitHub Profile
@luisxkimo
luisxkimo / MTProxy-vps.md
Created March 28, 2024 14:42 — forked from davilico05/MTProxy-vps.md
Proxy Telegram Self-Hosted - MTProxy

Cómo desplegar MTProxy en un servidor VPS propio

Vámos a utilizar el protocolo de proxy oficial de Telegram y la configuración nativa de la app de Telegram.

Actualmente la guía oficial presenta un problema de compilación en el README oficial TelegramMessenger/MTProxy pero siguiendo esta guía conseguirá sortear el problema que se encuentra solucionado en una issue del repositiorio oficial.

1. Instalación

1.1. Instancie una máquina con Ubuntu 22.04 o Debian 11/12. Conectese por ssh a la máquina:

@luisxkimo
luisxkimo / rke2-commands.md
Created October 10, 2023 07:54 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@luisxkimo
luisxkimo / Dockerfile
Created June 23, 2021 15:29 — forked from alonsoir/Dockerfile
Docker patterns/anti-patterns
### Generic Dockerfile demonstrating good practices
### Imports
# Bad-ish, we do not need Ubuntu for this, nor do we want latest if we are using in a build system, predictable is better
FROM ubuntu:latest
# Better, using a small image since our app has no dependency on Ubuntu
FROM alpine:3.3
@luisxkimo
luisxkimo / docker-compose.yml
Created June 12, 2020 07:07 — forked from pantsel/docker-compose.yml
example docker-compose.yml for kong, postgres and konga
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@luisxkimo
luisxkimo / trx-to-junit.xslt
Created February 28, 2020 14:52 — forked from cdroulers/trx-to-junit.xslt
Transform dotnet test output (TRX) to jUnit format for CI purposes.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a ="http://microsoft.com/schemas/VisualStudio/TeamTest/2006" xmlns:b ="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" >
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<testsuites>
<xsl:variable name="buildName" select="//a:TestRun/@name"/>
<xsl:variable name="numberOfTests" select="count(//a:UnitTestResult/@testId) + count(//b:UnitTestResult/@testId)"/>
<xsl:variable name="numberOfFailures" select="count(//a:UnitTestResult/@outcome[.='Failed']) + count(//b:UnitTestResult/@outcome[.='Failed'])" />
<xsl:variable name="numberOfErrors" select="count(//a:UnitTestResult[not(@outcome)]) + count(//b:UnitTestResult[not(@outcome)])" />
<xsl:variable name="numberSkipped" select="count(//a:UnitTestResult/@outcome[.!='Passed' and .!='Failed']) + count(//b:UnitTestResult/@outcome[.!='Passed' and .!='Failed'])" />
- name: Installing Notepad++
win_package:
path: https://notepad-plus-plus.org/repository/7.x/7.5.1/npp.7.5.1.Installer.x64.exe
arguments: '/S'
product_id: "Notepad++"
state: present
when: ansible_os_family == 'Windows'
- name: Check Path Variable on Windows hosts
win_shell: $Env:Path
@luisxkimo
luisxkimo / MyOwnController.cs
Last active May 4, 2016 12:58
Simple Webapi integration test
[TestFixture]
public class MyOwnControllerTest
{
private static HttpClient validHttpClient;
private static MyOwnRequest validRequest;
[OneTimeSetUp]
public void InitializeTestFixture()
{
validHttpClient = new HttpClient { BaseAddress = new Uri(ConfigurationManager.AppSettings["ApiUrl"]) };
var encodedKey = Convert.ToBase64String(Encoding.Default.GetBytes(ConfigurationManager.AppSettings["Key"]));
@luisxkimo
luisxkimo / ngoptionsTesting
Created May 9, 2014 11:37
Prueba con ng-options de Angular para una lista de opciones con valores y labels personalizados
//1 - Definimos los valores y los labels para el DropDownList y creamos una propiedad con uno de esos valores por defecto:
// ... todo dentro del controlador
$scope.orderPropList = [{
value : 'age', label : 'Newest'
}, {
value : 'name', label : 'Alphabetical'
}, {
value : '-age', label : 'Oldest'
}];
@luisxkimo
luisxkimo / GenerateStackOverFlowException
Created March 25, 2014 17:56
Example StackOverFlowException to test Dispose event
public class MyObject : IDisposable
{
public string id;
public MyObject(string id, bool throwException)
{
if (throwException)
{
//Environment.Exit(100);
Recursive(1000);
}
@luisxkimo
luisxkimo / ILUsingStatement
Created March 24, 2014 16:37
IL associate to TestUsingStatement
.method private hidebysig static void Main(string[] args) cil managed
{
.entrypoint
// Code size 65 (0x41)
.maxstack 3
.locals init ([0] class PruebasUsingStatement.MyObject obj1,
[1] class PruebasUsingStatement.MyObject obj2)
IL_0000: ldstr "Uno"
IL_0005: ldc.i4.0
IL_0006: newobj instance void PruebasUsingStatement.MyObject::.ctor(string,