Skip to content

Instantly share code, notes, and snippets.

View savokiss's full-sized avatar
😉
Focusing

savokiss savokiss

😉
Focusing
View GitHub Profile
@savokiss
savokiss / auto_pool_token.md
Created June 15, 2023 11:05 — forked from pengzhile/auto_pool_token.md
auto pool token
  1. 通过 pip install pandora-chatgpt 安装依赖。
  2. 保存以下代码到auto_pool_token.py文件。
  3. 同目录新建文件credentials.txt一行一个账号密码。
  4. 账号和密码之间用,分隔,不需要额外的引号。
  5. 如果需要修改代理,unique_name等,自行修改再运行。
  6. 运行这个auto_pool_token.py
  7. 你会看到运行进度,运行完成可看到pool token
  8. 运行中间结果分别保存在同目录tokens.txtshare_tokens.txt中。
@savokiss
savokiss / using-eslint-with-prettier.md
Last active May 21, 2021 10:47 — forked from yangshun/using-eslint-with-prettier.md
Comparison between tools that allow you to use ESLint and Prettier together.
prettier-eslint eslint-plugin-prettier eslint-config-prettier
它是什么 导出单个功能的JavaScript模块. 一个 ESLint 插件. 一个 ESLint 配置.
它干了什么 prettier 处理代码(字符串),然后运行 eslint --fix. 输出仍然是字符串. 插件通常包含 ESLint 将检查的其他规则。 此插件在内部使用 Prettier,并且当您的代码与 Prettier 的预期输出不同时,它将抛出 ESLint 错误。. 此配置关闭了可能与 Prettier 冲突的与格式相关的规则,从而让你可以将 Prettier 与其他 ESLint 配置一起使用,如 eslint-config-airbnb.
如何使用 要么写代码实现,要么通过 prettier-eslint-cli 用命令行实现. 配置 .eslintrc. 配置 .eslintrc.
最终输出是否符合 Prettier 规范? 取决于你的 ESLint 配置
是否需要单独运行 prettier 命令?
是否还需要其他工具? 你可能需要使用 eslint-config-prettier 来关闭有冲突的规则.

Phaser Cheatsheet

This is the content from the original Phaser cheatsheet, the site of which went down. I'm editing outdated information as I come across it.

Starting a new game

Reference: http://docs.phaser.io/Phaser.Game.html#Game

var game = new Phaser.Game(width, height, renderer, "parent");
//All parameters are optional but you usually want to set width and height
//Remember that the game object inherits many properties and methods!
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传!
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!!
步骤:
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd
@savokiss
savokiss / config.json
Created June 28, 2017 02:13 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@savokiss
savokiss / config.json
Created June 14, 2017 08:33 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@savokiss
savokiss / debounce.js
Created June 14, 2017 02:20 — forked from anonymous/debounce.js
JavaScript debounce
// from https://github.com/benfrain/rwd/blob/master/ch3/example_03-02/main.js
// This debounce function (via: https://remysharp.com/2010/07/21/throttling-function-calls) merely stops functioned firing too often on repetitive events (such as resize/scroll)
function debounce(fn, delay) {
var timer = null;
return function () {
var context = this, args = arguments;
clearTimeout(timer);
timer = setTimeout(function () {
fn.apply(context, args);