Skip to content

Instantly share code, notes, and snippets.

View icyleaf's full-sized avatar
🍺
Diving into beer

icyleaf icyleaf

🍺
Diving into beer
View GitHub Profile
@icyleaf
icyleaf / README.md
Last active December 24, 2023 11:24
Cloudflare DDNS 更新脚本 for Openwrt/Lede

Cloudflare DDNS 更新脚本 for Openwrt/Lede

依赖

  • ddns-script
  • curl

教程

如果你安装 ddns-script 在添加到供应商看到了 cloudflare 那就不需要本脚本了,如果没有看到那么接着往下看。

@icyleaf
icyleaf / README.md
Last active November 26, 2023 13:41
Gitea migrate storage from local to minio auto script

Gitea migrate storage script

This is based on offically cli tool built-in subcommand calls migrate-storage.

@icyleaf
icyleaf / ar_migrate.rb
Last active October 13, 2023 03:21
ActiveRecord type of integer (tinyint, smallint, mediumint, int, bigint)
# activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb
# Maps logical Rails types to MySQL-specific data types.
def type_to_sql(type, limit = nil, precision = nil, scale = nil)
return super unless type.to_s == 'integer'
case limit
when 1; 'tinyint'
when 2; 'smallint'
when 3; 'mediumint'
when nil, 4, 11; 'int(11)' # compatibility with MySQL default
@icyleaf
icyleaf / README.md
Last active September 17, 2023 12:34
Access Synology DSM on public IP binded domain without port (traefik version)

Access Synology DSM on public IP binded domain without port (traefik version)

More detail to visit my blog: https://icyleaf.com <-- Not publish yet.

@icyleaf
icyleaf / cloudSettings
Created January 28, 2023 05:22
Visual Studio Code Settings Sync Gist
// Empty
@icyleaf
icyleaf / README.md
Created August 12, 2022 13:44 — forked from triangletodd/README.md
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@icyleaf
icyleaf / remote.php
Created March 31, 2010 03:16
HTTP Request/Response Library
<?php
/**
* Provides remote server communications options using [curl][ref-curl].
*
* [ref-curl]: http://php.net/curl
*
* @author icyleaf <icyleaf.cn@gmail.com>
* @link http://icyleaf.com
* @version 0.3.1
* @license http://www.opensource.org/licenses/bsd-license.php
@icyleaf
icyleaf / 呼伦贝尔骑行计划书.md
Last active December 21, 2021 12:05
呼伦贝尔骑行计划书

呼伦贝尔骑行计划书

出行时间

2013.6.9 ~ 6.16 (端午+请两天假+周末)

计划安排 16 日到达北京,不影响 17 日正常上班。

总公里数