Skip to content

Instantly share code, notes, and snippets.

@andreyryabtsev
andreyryabtsev / backmatting.ipynb
Last active January 16, 2024 11:59
BackMatting.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tennc
tennc / workers.js
Created September 25, 2019 07:54
这个更棒~ 速度更快~
// List of domains bind to your WorkersProxy.
const domain_list = ['https://你的cloudflareWorker应用地址/']
// Website you intended to retrieve for users.
const upstream = 'https://需要加速的网站的地址/'
// Website you intended to retrieve for users using mobile devices.
const upstream_mobile = 'https://需要加速的网站移动端的地址/'
// Countries and regions where you wish to suspend your service.
@haoflynet
haoflynet / graphene-sqlalchemy-example
Created August 14, 2018 09:33
graphene-sqlalchemy使用示例,教程见https://haofly.net/python-graphql
import graphene
from graphene import String
from graphene_sqlalchemy import SQLAlchemyObjectType, SQLAlchemyConnectionField
from promise import Promise
from promise.dataloader import DataLoader
from sqlalchemy import Column, BigInteger, ForeignKey
from sqlalchemy.orm import relationship
from db import Base, db_session # 这里自己去定义
@Waltibaba
Waltibaba / lxc_mount_block_device
Last active April 26, 2024 04:13
Mount a block device like HDD inside an LXC container (specifically in proxmox 4)
Mounting block device in lxc (specifically Proxmox 4)
1. Find devices' major & minor ID (need both dev + partition for HDD)
# ls -al /dev/sda
brw-rw---- 1 root disk 8, 0 Dec 19 11:16 /dev/sda1
# ls -al /dev/sda1
brw-rw---- 1 root disk 8, 1 Dec 19 11:16 /dev/sda1
That's 8,0 for sda and 8,1 for sda1