Skip to content

Instantly share code, notes, and snippets.

View izackp's full-sized avatar

Isaac Paul izackp

View GitHub Profile
@izackp
izackp / socks-create.sh
Created October 17, 2024 00:14 — forked from AfroThundr3007730/socks-create.sh
Create an on-demand SSH-based SOCKS5 proxy via systemd socket activation
#!/bin/bash
# These steps will allow the setup of an on-demand SSH proxy
# Three unit files will be created to serve this purpose:
# ssh-socks-helper.socket - The listening socket providing activation
# ssh-socks-helper.service - A systemd proxy to pass the socket fd
# ssh-socks.service - The actual SSH service providing the tunnel
cat <<'EOF' > ~/.config/systemd/user/ssh-socks-helper.socket
[Unit]
Description=Proxy Helper Socket for Bastion SOCKS5 Proxy
@izackp
izackp / BlurImageView.java
Created November 10, 2021 21:08 — forked from bartektrail/BlurImageView.java
BlurImageView allows to dynamically blur an image and smoothly pass from sharp to fully blurred image. It's extended ImageView.
package pl.snowdog.material.view;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.renderscript.Allocation;
source ~/.bash_profile
hash oclint &> /dev/null
if [ $? -eq 1 ]; then
echo >&2 "oclint not found, analyzing stopped"
exit 1
fi