Skip to content

Instantly share code, notes, and snippets.

@kirinse
kirinse / Auth.tsx
Created September 7, 2025 15:23 — forked from lemmensaxel/Auth.tsx
React-native expo + keycloak PKCE flow implemented using expo AuthSession
import {
ActivityIndicator,
Button,
ScrollView,
Text,
View,
} from "react-native";
import * as AuthSession from "expo-auth-session";
import * as WebBrowser from "expo-web-browser";
import { useEffect, useState } from "react";
@kirinse
kirinse / Dockerfile
Created June 12, 2025 19:37 — forked from lucribas/Dockerfile
keycloak-phone-provider on Keycloak 26.x.x
ARG KEYCLOAK_VERSION=26.2.0
# --------------------------------------------------------
# Get some utils from Ubuntu
# --------------------------------------------------------
FROM ubuntu:20.04 AS ubuntu-micro-build
RUN apt-get update && apt-get install -y apt-utils binutils curl jq sed wget figlet procps
# --------------------------------------------------------
# Plugin build
@kirinse
kirinse / RUST.MD
Created October 6, 2024 13:55 — forked from Mefistophell/RUST.MD
How to Compile a Rust Program on Mac for Windows

Question: I want to compile my Rust source code for the Windows platform but I use macOS.

Solution:

  1. Install target mingw-w64: brew install mingw-w64
  2. Add target to rustup: rustup target add x86_64-pc-windows-gnu
  3. Create .cargo/config
  4. Add the instructions below to .cargo/config
[target.x86_64-pc-windows-gnu]
@kirinse
kirinse / proxy.pac
Created August 20, 2024 00:03 — forked from sahal/proxy.pac
Proxy Auto Configuration - SOCKS5 Sample
// see: http://blog.sahal.info/post/58278726443/chromebook-socks-proxies-and-ssh-tunnels
function FindProxyForURL(url, host)
{
// On my Chromebook, I've found that "Secure Shell" or Chrome itself doesn't close ports after a session timesout
// so I have to switch the local proxy listen address to 8081. Now, I don't have to use two proxy.pac files.
// See Simple PAC Load Balancing on proxypacfiles.com
// http://www.proxypacfiles.com/proxypac/index.php?option=com_content&view=article&id=63&Itemid=104
// https://web.archive.org/web/20131011081101/http://www.proxypacfiles.com/proxypac/index.php?option=com_content&view=article&id=63&Itemid=104
return "SOCKS5 localhost:8080; SOCKS5 localhost:8081";
}
import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
@kirinse
kirinse / setup-tor.md
Created July 5, 2024 09:24 — forked from skippednote/setup-tor.md
Setup Tor on macOS

Setup One: Buy a Mac if you don't have one.

Setup Two: Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Setup Three:

@kirinse
kirinse / get_chromedriver_download_progress.md
Created November 17, 2023 17:53 — forked from ic0n/get_chromedriver_download_progress.md
Get chromedriver current downloads progress(es) with python using selenium

Notice:

* This method is tested on Chrome Version 61.0.3163.100, chromedriver Version 2.33.506106

Getting the progress of the first downloads-item

So for some reason, chrome keeps download items in the shadow-root of tag .

This makes me so confused when I am trying to automate chrome to download files.

@kirinse
kirinse / readme.md
Created March 17, 2021 14:28 — forked from thomasdarimont/readme.md
How to enable OpenTracing in Keycloak 10.x

How enable Micro Profile OpenTracing in Keycloak 10.x

Keycloak 10.0.1 is based on Wildfly 19 which comes with support for OpenTracing. However the OpenTracing support in Keycloak is not active by default. This small example demonstrates how to enable OpenTracing in the latest Keycloak version based on the article Micro_Profile_OpenTracing_Comes_To_WildFly

This example tries to explore a solution for KEYCLOAK-8288.

@kirinse
kirinse / ln.go
Created February 24, 2021 09:28 — forked from thinkphp/ln.go
Natural Logarithm in Golang.
/*
* Adrian Statescu <[email protected]
* Natural Logarithm in Golang.
* ln(1) = 0
*/
package main
import ("fmt"
"os"
"strconv"
@kirinse
kirinse / install-grpc-php-on-mac.sh
Last active June 10, 2020 22:26 — forked from sagikazarmark/install-grpc-php-on-mac.sh
Install the gRPC PHP plugin
# Install the gRPC PHP plugin on Mac
#
# See: http://www.grpc.io/docs/quickstart/php.html#install-protobuf-plugin
# Source: https://gist.github.com/johndpope/503029706ed56d5375d1e9469f0135d4
# Install build dependencies
brew install automake libtool
## Clone gRPC repo
git clone --recursive -b v1.4.x https://github.com/grpc/grpc