Skip to content

Instantly share code, notes, and snippets.

View picasso250's full-sized avatar
💭
I may be slow to respond.

pica picasso250

💭
I may be slow to respond.
View GitHub Profile
// ==UserScript==
// @name lowlightRecommended-twitter
// @namespace Violentmonkey Scripts
// @match https://twitter.com/*
// @grant none
// @version 1.0
// @author -
// @description 2024/1/18 14:45:09
// ==/UserScript==
// ==UserScript==
// @name 网页整页翻译(谷歌翻译)
// @author Kaiter-Plus
// @author xiaochi
// @namespace https://gitee.com/Kaiter-Plus/TampermonkeyScript/tree/master/Translate
// @description 给每个非中文的网页左下角添加一个google翻译图标,直接调用 Google 的翻译接口对非中文网页进行翻译
// @exclude /^[http|https].*[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/
// @exclude /lanzous\.com/
// @exclude /w3school.*\.cn/
// @exclude /.*baidu.*/
// from c++ version: https://gist.github.com/timshen91/f6a3f040e5b5b0685b2a
// author: wangxiaochi
function ConcatExpr (Left,Right) {this.Left = Left;this.Right=Right} // ab
function AltExpr(Left,Right) {this.Left = Left;this.Right=Right} // a|b
function RepeatExpr(SubExpr) {this.SubExpr= SubExpr;} // a*
function OptionalExpr(SubExpr) {this.SubExpr= SubExpr;} // a?
function MatchExpr(ch) {
this.ch= ch
}

我说一下我对现阶段的理解:
这个阶段, 1 因为中美冷战即将开始或者已经开始,中国民众具有较强的民族意识。当前国际的主要矛盾是全球化能不能继续进行的矛盾。 2 国内的状况是经过30年的快速经济发展,执政党具有超乎寻常的合法性,因此执政党和资本家联合起来压迫无产阶级,现阶段是难于反抗的。
那么我们主要任务,在现阶段有二:1 是宣传马克思主义 2 是建立组织,锻炼队伍,保持火种不灭。
至于合作社,其主要目的还是锻炼队伍。其最终结果,我也不看好。 以上是我的个人意见。

// ==UserScript==
// @name 必应去上下广告且知乎去时间线广告且CSDN自动展开全文
// @version 1.1
// @include /^https?://cn\.bing\.com/.*$/
// @include /^https?://www\.zhihu\.com/.*$/
// @include /^https?://blog\.csdn\.net/.*$/
// @grant none
// ==/UserScript==
// 2020/06/19 增加CSDN自动展开全文功能
@picasso250
picasso250 / player.php
Created May 23, 2018 06:45
player for youtube-dl (with sub titles) https://rg3.github.io/youtube-dl/
<?php
$name = isset($_GET['name'])?trim($_GET['name']):'';
if ($name === '') {
$list = glob("*.mp4");
}
function get_sub_title($name) {
$file = "$name.en.vtt";
if (is_file($file)) return $file; else return false;
}
?>
@picasso250
picasso250 / deploy-ssh
Last active May 14, 2018 10:41
deploy PHP project on linux
#!/bin/bash
# deploy project with ssh
# has to work with deploy_remote
set -eu
git_root_dir=~/Documents/work/git/xxx # the dir of git
git_src_dir=. # if you don't want copy whole dir, change it to sub dir
git_sub_dir="a b" # sub dir list to deploy
@picasso250
picasso250 / test.php
Last active May 11, 2018 16:41
PHP test tool by xiaochi
#!env php
<?php
// PHP test tool by xiaochi
// Usage: test.php foo.php
// If you have a test_foo.php, it will automatically include
// foo.php and run test_foo.php.
// It also includes `vendor/autoload.php`
$vendor_autoload = "vendor/autoload.php";
@picasso250
picasso250 / brain-fuck-to-c.c
Last active April 1, 2018 16:20
a brain fuck vm writen by c
#include <stdio.h>
#include <stdlib.h>
int main() {
int c;
puts("#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\nint main(){char *ptr=malloc(3000);memset(ptr, \'\\0\', 3000);");
while ((c=getchar())!=EOF) {
switch (c) {
case '>': puts("++ptr;"); break;
case '<': puts("--ptr;"); break;
@picasso250
picasso250 / behav-test.php
Last active March 30, 2018 07:41
a small behavior test framework for php
<?php
if (!isset($argv[1])) {
echo "Usage: $argv[0] test_file\n";
exit();
}
$_cur_test_file = $argv[1];
if (!is_file($_cur_test_file)) {
echo "$_cur_test_file not exits\n";
exit(1);