Skip to content

Instantly share code, notes, and snippets.

View keepanote's full-sized avatar
🎯
Focusing

levelup keepanote

🎯
Focusing
View GitHub Profile
@keepanote
keepanote / webdl.sh
Created October 1, 2019 06:05 — forked from yantze/webdl.sh
wget 整站下载
# 使用 wget 下载整个网站解释
# link: https://www.douban.com/note/536265958
# wget
# --recursive //回归递推也就是包括所有子目录子文件
# --no-clobber //不更改已经存在的文件,也不使用在文件名后添加 .#(# 为数字)的方法写入新的文件
# --page-requisites //下载所有显示完整网页所需的文件,例如图像。
# --html-extension //将所有text/html文档以.html扩展名保存
# --convert-links //转换非相对链接为相对链接
# --no-parent //不要追溯到父目录
# --level=0 // Specify recursion maximum depth level depth.
@keepanote
keepanote / china-unicom-cdn.md
Created January 19, 2016 15:42 — forked from lovemyliwu/china-unicom-cdn.md
使用联通cdn加速下载

120.52.72.*/original-uri

ip 地址获取脚本

window.success = [];
function test() {
    for(var idx=1;idx<255;idx++){
        var el = document.createElement('img');
        el.src = '//120.52.72.' + idx + '/41.media.tumblr.com/5cb6715c800c5b00969f33c162b317d1/tumblr_nzjh7dPKcD1ssbwqro1_540.png';
@keepanote
keepanote / 163.php
Created December 27, 2015 15:24
网易云音乐 外部链接 - PHP 解析
<?php
// Original Author: Moon
// Save as: 163.php
// Format: http://localhost/163.php?id=619623.mp3
ERROR_REPORTING(0);
preg_match('/\d+/i', $_GET['id'], $id_matches);
$id = $id_matches[0];
$url = "http://music.163.com/api/song/detail/?id=".$id."&ids=%5B".$id."%5D";
@keepanote
keepanote / xiami.php
Created December 27, 2015 15:24
虾米音乐 外部链接 - PHP 解析
<?php
// Save as: xiami.php
// Format: http://localhost/xiami.php?id=1769726699.mp3
ERROR_REPORTING(0);
preg_match('/\d+/i', $_GET['id'], $id_matches);
$id = $id_matches[0];
$content = file_get_contents('http://www.xiami.com/widget/xml-single/sid/'.$id);
preg_match("/<\!\[CDATA\[([^\]].*)\]\]><\/location>/i", $content, $location);
@keepanote
keepanote / 163-dl.php
Created December 27, 2015 15:23
网易云音乐MV 资源下载 - PHP
<?php
## Save as: 163-dl.php
// Musci Video - Format: http://localhost/163-dl.php?pv=720&id=313066
// Musci Singer - Format: http://localhost/163-dl.php?request=singer&id=313066
// Musci Name - Format: http://localhost/163-dl.php?request=name&id=313066
// Musci Cover - Format: http://localhost/163-dl.php?request=cover&id=313066
## Can append suffix to the link. Example: http://localhost/163-dl.php?pv=720&id=313066.mp4
## No Internal Error Output
ERROR_REPORTING(0);
#!/usr/bin/env python
# Clone or update all a user's gists
# curl -ks https://raw.github.com/gist/1622504/gist-backup.py | python
# curl -ks https://raw.github.com/gist/1622504/gist-backup.py | USER=nicerobot python
import json
import urllib
from subprocess import call
from urllib import urlopen
import os
@keepanote
keepanote / css_resources.md
Last active August 29, 2015 14:07 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@keepanote
keepanote / javascript_resources.md
Last active August 29, 2015 14:07 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@keepanote
keepanote / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console