Skip to content

Instantly share code, notes, and snippets.

View CROSP's full-sized avatar

Alexander Molochko CROSP

View GitHub Profile
@CROSP
CROSP / Readme.md
Last active April 6, 2023 15:23 — forked from dreamorosi/Readme.md
Install and configure webserver based on nginx with php 7 and fpm over socket configured.

Install and configure webserver based on nginx with php 7 and fpm over socket configured plus a couple of utils.

While launching a new instance open the section Advanced details in step 3. Configure Instance paste this code that will clone this gist and run the install commands.

#!/bin/bash
yum install git -y
git clone https://gist.github.com/48cc75097b14661574311343f4215444.git /home/ec2-user/install
chmod a+x install/install.sh
bash /home/ec2-user/install/install.sh
@CROSP
CROSP / docker-compose.yml
Created February 7, 2019 00:17
Kafka Manager Auto Cluster Creation
version: '3.1'
services:
zookeeper:
image: zookeeper:3.4
volumes:
- "./zookeeper/data:/data"
- "./zookeeper/logs:/datalog"
ports:
- "2181:2181"
@CROSP
CROSP / gist:c443b7ad00b7a631c546309866f6b36f
Created October 29, 2018 08:35
Dagger 2 Generated Application Component
// Generated by dagger.internal.codegen.ComponentProcessor (https://google.github.io/dagger).
package net.crosp.android.dagger2scopeinternals.di.component.application;
import android.app.Activity;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import dagger.MembersInjector;
import dagger.internal.DoubleCheck;
import dagger.internal.Preconditions;
import javax.inject.Provider;
@CROSP
CROSP / proxy-del.sh
Last active June 15, 2020 18:57
DD-WRT Remove rules for transparent proxifying
#!/bin/sh
PROXIFYING_MACHINE=192.168.0.145
MACHINE_TO_PROXIFY=192.168.0.113
iptables -D PREROUTING -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
iptables -D PREROUTING -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -p tcp -m multiport --dports 80,443 -j CONNMARK --save-mark
iptables -D PREROUTING -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get wan_ipaddr` -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
iptables -D PREROUTING -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get wan_ipaddr` -p tcp -m multiport --dports 80,443 -j CONNMARK --save-mark
while ip rule delete from 0/0 to 0/0 table 13 2>/dev/null; do true; done
@CROSP
CROSP / dd-wrt-transparent-proxy.sh
Created August 30, 2017 16:48
DD-WRT Transparent proxy configuration
#!/bin/sh
PROXIFYING_MACHINE=192.168.0.145
MACHINE_TO_PROXIFY=192.168.0.113
iptables -I PREROUTING 1 -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
iptables -I PREROUTING 2 -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -p tcp -m multiport --dports 80,443 -j CONNMARK --save-mark
iptables -I PREROUTING 3 -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get wan_ipaddr` -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
iptables -I PREROUTING 4 -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get wan_ipaddr` -p tcp -m multiport --dports 80,443 -j CONNMARK --save-mark
ip rule add fwmark 3 table 13