Skip to content

Instantly share code, notes, and snippets.

View Ryiski's full-sized avatar
:shipit:
Nuts

Adel Ak Ryiski

:shipit:
Nuts
View GitHub Profile
@Ryiski
Ryiski / LeanText.tsx
Created January 30, 2025 06:23 — forked from hirbod/LeanText.tsx
React Native LeanView and LeanText component
import { type ComponentType, createElement, forwardRef } from 'react'
import type { TextProps } from 'react-native'
// uncomment for NativeWind support
//import { cssInterop } from 'nativewind'
const LeanText = forwardRef((props, ref) => {
return createElement('RCTText', { ...props, ref })
}) as ComponentType<TextProps>
@Ryiski
Ryiski / clear-db.ts
Created November 22, 2024 17:01 — forked from rphlmr/clear-db.ts
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;
@Ryiski
Ryiski / readme.md
Created January 14, 2024 21:22 — forked from ubergesundheit/readme.md
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@Ryiski
Ryiski / nginx-https-local.md
Created January 14, 2024 16:55 — forked from mehmetsefabalik/nginx-https-local.md
Enable https on your local environment with nginx

enable https on your local environment

install mkcert and create certificates

brew install mkcert
mkcert -install
@Ryiski
Ryiski / ezup-update.json
Created December 8, 2023 11:28 — forked from HuakunShen/ezup-update.json
ezup updater file
{
"version": "0.1.8",
"notes": "See the assets to download this version and install.",
"pub_date": "2023-06-13T05:12:10.282Z",
"platforms": {
"linux-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVRQlFBRHprQnQ1Qm1GZUpQcFBxTGJtbER3cWlmKzVPbUNMQlFNSXQ0TVQ2V0RSMVkzY1JNc0YvWGh5Y0FpZXlQY25TRXNrU0ErV0xCUjMyTmloUVR2dXZCMzBZK0hBTWdJPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjg2NjMyMDk3CWZpbGU6ZXotdXBfMC4xLjhfYW1kNjQuQXBwSW1hZ2UudGFyLmd6CnZ6ZHBkall4TnZhUlpieXUyMUZZTFBqRGJhVXpGVzFFUGFwcDByS3VQb0xrUE9uNWEzWEY0RGppRGQ4c3lpWlZvL3R6MHVGYkZjNjJmbnVmb3VWZ0RRPT0K",
"url": "https://github.com/HuakunShen/EzUp/releases/download/v0.1.8/ez-up_0.1.8_amd64.AppImage.tar.gz"
},
"windows-x86_64": {
@Ryiski
Ryiski / load_dotenv.sh
Created December 7, 2023 17:34 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@Ryiski
Ryiski / list-of-salutations-titles-honorifics.txt
Created November 6, 2023 07:40 — forked from neilhawkins/list-of-salutations-titles-honorifics.txt
List of salutations, honorifics, titles, Mr, Mrs, Sir in plain text
Mr
Mrs
Miss
Ms
Mx
Dr
Admiral
Air Comm
Ambassador
Baron
@Ryiski
Ryiski / CircularReveal.kt
Created August 7, 2023 04:44 — forked from darvld/CircularReveal.kt
A circular reveal effect modifier for Jetpack Compose.
package cu.spin.catalog.ui.components
import android.annotation.SuppressLint
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.updateTransition
import androidx.compose.runtime.State
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.draw.drawWithCache
import androidx.compose.ui.geometry.Offset
#!/usr/bin/env bash
# This script will try to find the adb remote debugging port in the specified
# IP address and then tell adb to try to connect to it.
# It is useful for connecting to an android device without opening the
# "Wireless debugging" screen to get the IP and the random port, which is
# cumbersome.
for line in $(avahi-browse --terminate --resolve --parsable --no-db-lookup _adb-tls-connect._tcp); do
if [[ $line != =* ]]; then
@Ryiski
Ryiski / FastList.tsx
Created July 11, 2023 12:38 — forked from derekstavis/FastList.tsx
Discord's FastList, but in TypeScript
import { forEachObjIndexed } from "ramda";
import * as React from "react";
import {
Animated,
ScrollView,
View,
ViewStyle,
LayoutChangeEvent,
NativeScrollEvent,
} from "react-native";