Skip to content

Instantly share code, notes, and snippets.

@d1y
d1y / remove_copyright.js
Created June 4, 2023 04:27
删除copyright
import { onMounted, ref, watch, computed } from "vue"
import {
getSyncPendings,
getSyncFinisheds,
getUploadPendings,
getUploadFinisheds,
getDownloadPendings,
getDownloadeds,
} from "@/shared/api/photoalbum"
@d1y
d1y / README.md
Created June 28, 2022 23:26 — forked from qti3e/README.md
List of file signatures and mime types based on file extensions
@d1y
d1y / sub.json
Created November 2, 2021 12:33
[
{
"name": "玖玖资源站",
"logo": "",
"desc": "",
"nsfw": true,
"api": {
"root": "http://99zywcj.com",
"path": "/inc/ck.php"
}
@d1y
d1y / sites.json
Created October 30, 2021 11:36 — forked from Hunlongyu/sites.json
资源网
[
{
"id": 1,
"key": "okzy",
"name": "OK 资源网",
"api": "http://cj.okzy.tv/inc/api.php",
"download": "http://cj.okzy.tv/inc/apidown.php"
},
{
"id": 2,
@d1y
d1y / null
Last active August 14, 2021 18:02
null
import 'package:flutter/material.dart';
class FadeIndexedStack extends StatefulWidget {
final int index;
final List<Widget> children;
final Duration duration;
const FadeIndexedStack({
Key key,
this.index,
@d1y
d1y / android_instructions.md
Created May 14, 2021 02:16 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

import Cocoa
import MediaPlayer
let bundle = CFBundleCreate(kCFAllocatorDefault, NSURL(fileURLWithPath: "/System/Library/PrivateFrameworks/MediaRemote.framework"))
let MRMediaRemoteRegisterForNowPlayingNotificationsPointer = CFBundleGetFunctionPointerForName(
bundle, "MRMediaRemoteRegisterForNowPlayingNotifications" as CFString
)
typealias MRMediaRemoteRegisterForNowPlayingNotificationsFunction = @convention(c) (DispatchQueue) -> Void
let MRMediaRemoteRegisterForNowPlayingNotifications = unsafeBitCast(MRMediaRemoteRegisterForNowPlayingNotificationsPointer, to: MRMediaRemoteRegisterForNowPlayingNotificationsFunction.self)
@d1y
d1y / gist:d809eed89a7b957b04c7f7dab15ea258
Created March 15, 2021 02:46 — forked from hpatoio/gist:4398399
Create a MySQL database and create a user with all grant on it
CREATE USER 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD';
GRANT USAGE ON * . * TO 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
CREATE DATABASE IF NOT EXISTS `DB_USERNAME` ;
GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'localhost';
#For connection from everywhere
GRANT USAGE ON * . * TO 'DB_USERNAME'@'%' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'%';