See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| // ==UserScript== | |
| // @name Rutracker.org Magnet URLs | |
| // @namespace rutrackerorg-magnet-urls | |
| // @description Transforms torrent hash into a magnet url | |
| // @include https://rutracker.org/* | |
| // @include https://rutracker.cr/* | |
| // @include https://rutracker.net/* | |
| // @include https://rutracker.nl/* | |
| // @include http://rutrackerripnext.onion/* | |
| // @version 9 |
| var mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
| private func createCVPixelBuffer(from image: UIImage) -> CVPixelBuffer? { | |
| let attrs = [kCVPixelBufferCGImageCompatibilityKey: kCFBooleanTrue, kCVPixelBufferCGBitmapContextCompatibilityKey: kCFBooleanTrue] as CFDictionary | |
| var pixelBuffer : CVPixelBuffer? | |
| let status = CVPixelBufferCreate(kCFAllocatorDefault, Int(image.size.width), Int(image.size.height), kCVPixelFormatType_32ARGB, attrs, &pixelBuffer) | |
| guard status == kCVReturnSuccess else { | |
| return nil | |
| } | |
| CVPixelBufferLockBaseAddress(pixelBuffer!, CVPixelBufferLockFlags(rawValue: 0)) | |
| let pixelData = CVPixelBufferGetBaseAddress(pixelBuffer!) |
原文:Python开发者
(点击上方蓝字,快速关注我们)
来源:阿驹的自荐投稿(微信公号:驹说码事)
如有好文章投稿,请点击 → 这里了解详情
前言
| http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8 | |
| http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8 | |
| http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8 | |
| http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on | |
| http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8 |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import asyncio | |
| import base64 | |
| import hashlib | |
| import json | |
| import random | |
| import sys | |
| import time |
** 由于此文年事已久,可能某些 URL Schemes 已失效,可在评论区留言指出!(最后更新于 2024.10.28)
由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在 APP 之间跳转的方法:URL Scheme。简单的说,URL Scheme 就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的 URL Scheme 都是不一样的,如果存在一样的 URL Scheme,那么系统就会响应先安装那个 APP 的 URL Scheme,因为后安装的 APP 的 URL Scheme 被覆盖掉了,是不能被调用的。
| /** | |
| * MacEditorTextView | |
| * Copyright (c) Thiago Holanda 2020-2021 | |
| * https://bsky.app/profile/tholanda.com | |
| * | |
| * (the twitter account is now deleted, please, do not try to reach me there) | |
| * https://twitter.com/tholanda | |
| * | |
| * MIT license | |
| */ |
| #!/usr/bin/python3 | |
| from functools import partial | |
| def colors16(): | |
| for bold in [0, 1]: | |
| for i in range(30, 38): | |
| for j in range(40, 48): | |
| print(f'\x1b[{bold};{i};{j}m {bold};{i};{j} |\x1b[0m', end='') | |
| print() |