Skip to content

Instantly share code, notes, and snippets.

View forecho's full-sized avatar
🎯
Focusing

蔡正海 forecho

🎯
Focusing
View GitHub Profile
@forecho
forecho / wsj.user.js
Created December 24, 2021 09:58
Wall Street Journal Paywall bypass
/* jshint esversion: 6 */
// ==UserScript==
// @name WSJ and Barrons Paywall Hack
// @include https://*.wsj.com/*
// @include https://*.barrons.com/*
// @run-at document-end
// @grant none
// @version 2
// ==/UserScript==
@forecho
forecho / uploadcontroller.php
Last active September 15, 2015 06:00 — forked from appcodr/uploadcontroller.php
REST API controller code in Yii2 to upload photo/file
<?php
class UploadController extends ActiveController
{
public $documentPath = 'documents/';
public function verbs()
{
$verbs = parent::verbs();
$verbs[ "upload" ] = ['POST' ];
@forecho
forecho / 0_reuse_code.js
Last active August 29, 2015 14:21
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
<?php
/*
Author: icanc <i@icanc.net>
*/
function R( $Request='/',array $Router ){
$Response = array();
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
var ids = document.querySelectorAll(".member_id");
var names = document.querySelectorAll(".member_name");
var output = "", length = ids.length;
for(var i=0; i<length; i++){
output += ids[i].innerHTML.slice(1,-1) + ":" + names[i].innerHTML + "\n";
}
console.log(output);
Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
---
# Python 简介
@su27 and @menghan
---

What is Python?

Python: 优雅而健壮的编程语言

  • 高级

  • 易学易读易维护