Skip to content

Instantly share code, notes, and snippets.

@matteomattei
matteomattei / crc32.py
Created July 8, 2014 07:52
Calculate CRC32 of a file in Python
#!/usr/bin/env python
import binascii
def CRC32_from_file(filename):
buf = open(filename,'rb').read()
buf = (binascii.crc32(buf) & 0xFFFFFFFF)
return "%08X" % buf
@gabe565
gabe565 / change-arc-icon.md
Last active April 28, 2024 07:43
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@kiewic
kiewic / Do-RecursiveGitPull.ps1
Created July 8, 2016 06:02
Perform git pull in all subdirectories that contain a git repository using PowerShell.
Get-ChildItem -Directory -Force -Recurse *.git | ForEach-Object { cd $_.Parent.FullName; Write-Host $_.Parent.FullName; git pull }
@lambdalisue
lambdalisue / update_dynamic_dns.sh
Created December 20, 2014 22:53
A cron script to update IP address in Dynamic DNS of Value Domain
#!/usr/bin/env bash
#==============================================================================
# Update IP address in Dynamic DNS of VALUE DOMAIN
#
# Author: Alisue <lambdalisue@hashnote.net>
# License: MIT License
#
# (C) 2014, hashnote.net, Alisue
#==============================================================================
# CONFIG
ActivityPub 是一种去中心化的内容聚合协议,可以让其他用户远程订阅你的内容。它很像升级版的 RSS,但是支持远程推送,因此订阅者可以及时获取你的内容,而不必时不时从客户端进行抓取。
下面是目前支持 ActivityPub 协议的开源软件,可以在自己的服务器架设服务。
- 微博(Twitter 的替代品):[Mastodon](https://mastodon.social/),[Pleroma](https://pleroma.social/)
- 照片分享(Instagram 的替代品):[Pixelfed](https://pixelfed.social/)
- 视频分享(Youtube 的替代品):[Peertube](https://joinpeertube.org/)
- 博客(Facebook 的替代品):[WriteFreely](https://writefreely.org/),[WordPress + ActivityPub 插件](https://wordpress.org/plugins/activitypub/),[Plume](https://joinplu.me/)
- 聊天(Slack 的替代品):[Mattermost](https://mattermost.com/),[Matrix](https://matrix.org/)
- 音乐分享(Spotify 的替代品):[Funkwhale](https://funkwhale.audio/)
@Composable
fun MainScreen() {
Column(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.surface),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
AnimatedBorderCard(
@padeoe
padeoe / README_hfd.md
Last active April 28, 2024 07:39
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 07:45
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@mehmetsefabalik
mehmetsefabalik / nginx-https-local.md
Last active April 28, 2024 07:37
Enable https on your local environment with nginx

enable https on your local environment

install mkcert and create certificates

brew install mkcert
mkcert -install