Skip to content

Instantly share code, notes, and snippets.

@mitchelldavis
mitchelldavis / mingw.common.targets
Created December 31, 2013 04:11
MSBuild for MinGW
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Target Name="SetupProject">
<MakeDir Directories="$(MSBuildProjectDirectory)\obj;$(MSBuildProjectDirectory)\bin" />
</Target>
<Target Name="CleanProject">
<RemoveDir Directories="$(MSBuildProjectDirectory)\obj;$(MSBuildProjectDirectory)\bin" />
</Target>
@samhocevar
samhocevar / gist:00eec26d9e9988d080ac
Last active January 13, 2024 23:40
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@johannesjh
johannesjh / Using Signal with Dual-Sim Phones.md
Last active October 10, 2023 08:01
Documentation on how to use Signal with Dual-Sim Phones

Using Signal with Dual Sim or Multi Sim Phones

Signal (previously TextSecure) on Android can be used on dual-sim or multi-sim smartphones, albeit with some limitations regarding use of the additional sim cards.

Multi Sim Usage

Available Functionality

/* https://gist.github.com/gdamjan/9560411 */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/timerfd.h>
#include <time.h>
#include <unistd.h>
#define handle_error(msg) \
@braian87b
braian87b / mwan3-notes.md
Last active October 22, 2023 12:33
How to get MWAN3 Working Properly on OpenWRT / LEDE

In experience to get a proper working multiple wan configuration using mwan3 starting from scratch you should:

Important: this works well on OpenWRT 15.05.1, on newer versions there was some breaking changes, for example, the wan ifaces have ipv6 capability and now are named with letters ("wan, wanb... , wanc" instead of "wan, wan2... wan3" so wanb6 means 2nd wan ipv6.): https://github.com/openwrt/packages/blob/master/net/mwan3/files/etc/config/mwan3

The official documentation seems to be very detailed and up to date, I recommend reading those first: https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3 but I recommend to give a look at my config file below, since my approach for policyes is very nice.

First of all: Activate conntrack, docs says that is important and neccesary to get MWAN3 work properly, and it is needed to reboot: