Skip to content

Instantly share code, notes, and snippets.

@vishal2376
vishal2376 / FlipAnimation.kt
Created April 25, 2024 17:16
Card Flip Animation using Jetpack Compose
package com.vishal2376.animations.ui.theme
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.EaseInOut
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
@mufidu
mufidu / download_imgs.py
Last active April 28, 2024 06:18
Download all images in markdown files and rename the links to point to the local files
# Download all images from all FOLDER_NAME in FOLDER_NAME folder
# and save them to FOLDER_NAME/_attachments folder.
# Then replace remote image paths with local paths.
# Usage: python download_imgs.py
import os
import urllib
import urllib.parse
import urllib.request
import re
@pyther
pyther / syslinux-install_update
Created January 9, 2011 23:25
syslinux-install_update
#!/bin/bash
#
# Sylinux Installer / Updater Scripts
# Copyright (C) 2011 Matthew Gyurgyik <pyther@pyther.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 28, 2024 06:16
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@CHIZI-0618
CHIZI-0618 / PuerNya_sing-box_fakeip_client_config.jsonc
Last active April 28, 2024 06:14
sing-box 带有 Proxy Providers 的客户端配置示例
{
"log": {
"level": "info",
"output": "sing-box.log",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "cloudflare",
@piyushgarg-dev
piyushgarg-dev / install_nginx.md
Last active April 28, 2024 06:13
Nginx Installation
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 28, 2024 06:12
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@Artefact2
Artefact2 / README.md
Last active April 28, 2024 06:09
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}
@dasbairagya
dasbairagya / function.php
Created May 1, 2017 05:18
short code to get the woocommerce recently viewed products
//short code to get the woocommerce recently viewed products
<?php function custom_track_product_view() {
if ( ! is_singular( 'product' ) ) {
return;
}
global $post;
if ( empty( $_COOKIE['woocommerce_recently_viewed'] ) )
$viewed_products = array();