Skip to content

Instantly share code, notes, and snippets.

@isayme
isayme / upload.js
Last active June 26, 2020 02:29
服务端使用 request & axios 上传文件
/*
* request 背后也是用的 form-data. 符合浏览器的 window.FromData 规范生产 body 及 header 信息.
* smfile 需要是 stream, 从而判定为文件.
* 另: formstream 应该也可以, 但没有测试过.
*/
const fs = require('fs')
const axios = require('axios')
const request = require('request-promise')
const FormData = require('form-data')
// ==UserScript==
// @name 电影天堂(dy2018.com)
// @version 0.1.2
// @description 修正下载链接
// @author iSayme
// @namespace https://github.com/isayme
// @homepage https://github.com/isayme
// @icon https://www.dy2018.com/favicon.ico
// @include https://www.dy2018.com/*
// @run-at document-end

Keybase proof

I hereby claim:

  • I am isayme on github.
  • I am isayme (https://keybase.io/isayme) on keybase.
  • I have a public key whose fingerprint is 1423 B54A 7C03 A38F 1B39 2167 10EE 8329 90BC 2A8A

To claim this, I am signing this object:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
@isayme
isayme / nogoogleredirect.user.js
Created August 13, 2014 07:56
油猴脚本 => 禁止点击Google搜索结果的跳转.
// ==UserScript==
// @name noGoogleRedirect
// @namespace http://www.onefloweroneworld.com
// @description 禁止点击Google搜索结果的跳转.
// @include http://www.google.com/search?*
// @include https://www.google.com/search?*
// @version 0.1
// @author iSayme <[email protected]>
// @run-at document-end
// @grant none
@isayme
isayme / songtaste-download.user.js
Last active January 19, 2017 11:11
油猴脚本 => 获取SongTaste歌曲下载链接, 点击页面中的"下载歌曲"即可直接下载.
// ==UserScript==
// @name SongTasteDownload
// @namespace http://www.onefloweroneworld.com
// @description 自动解析SongTaste歌曲URL,点击即可下载~
// @include http://www.songtaste.com/song/*
// @include http://songtaste.com/song/*
// @include http://www.songtaste.com/playmusic.php?song_id=*
// @include http://songtaste.com/playmusic.php?song_id=*
// @version 0.1
// @author iSayme
@isayme
isayme / Backbone-1.1.2-comments.js
Last active September 15, 2017 22:01
Backbone源码注释
// Backbone.js 1.1.2
// (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
// 典型自执行函数格式:
// (funtion(root, factory) {
// // do stuff here
*, *:before, *.after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
.bg-black { background-color: #333333; }
.bg-white { background-color: #f6f6f6; }
$black: #333333;
$white: #f6f6f6;
$gray: #aaaaaa;
$silver: #dddddd;
$red: #e54d42;
$green: #1abc9c;
$yellow: #FFDC00;
$blue: #3498db;
$navy: #34495e;
body {
background: url(/img/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}