This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
微信小程序canvas绘制胶水代码 | |
*/ | |
class Draw { | |
constructor(canvas, context) { | |
this.canvas = canvas | |
this.ctx = context | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/noahsark769/OrderedTODO/blob/master/OrderedTODO/DatabaseManager.swift | |
// | |
// DatabaseManager.swift | |
// OrderedTODO | |
// | |
// Created by Noah Gilmore on 12/26/19. | |
// Copyright © 2019 Noah Gilmore. All rights reserved. | |
// | |
import Foundation | |
import GRDB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
const fsPromises = require('fs').promises | |
const { execSync } = require('child_process'); | |
const root = '.' | |
async function main() { | |
const dirs = await fsPromises.readdir(root) | |
for (let i = 0; i < dirs.length; i ++) { | |
const name = dirs[i], dir = path.join(root, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 使用以下命令替换 gems 默认源 | |
# 添加 TUNA 源并移除默认源 | |
gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/ | |
# 列出已有源 | |
gem sources -l | |
# 应该只有 TUNA 一个 | |
## home brew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
# brew 程序本身,Homebrew/Linuxbrew 相同 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 在设备列表的控制台上输入 | |
var s = ''; $('tr.jqgrow').each(function() { var $s = $(this), n = $s.find('td:nth-child(2)').text(), t = $s.find('td:nth-child(4)').text(); as.push({n:n, t:t}); s += n + "\t" + t + "\n"}); | |
// 这就是我们想要的了 | |
s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################## | |
# dnspodsh v0.3 | |
# 基于dnspod api构架的bash ddns客户端 | |
# 作者:zrong(zengrong.net) | |
# 详细介绍:http://zengrong.net/post/1524.htm | |
# 创建日期:2012-02-13 | |
# 更新日期:2014-02-10 加入wget支持 | |
############################## |