Skip to content

Instantly share code, notes, and snippets.

View zYeoman's full-sized avatar
👓
Coding

Yongwen Zhuang zYeoman

👓
Coding
View GitHub Profile
#include "stdio.h"
char weight[10];
int compare(const char *a, const char *b){
return weight[*a]-weight[*b];
}
void ShuffleArray_Sort(char* arr, int len){
for (int j = 0; j < 10; ++j){
@zYeoman
zYeoman / ReadablePass.js
Created December 1, 2016 16:08
Generate readable password. Will not continue. Maybe.
// ==UserScript==
// @name ReadablePass
// @namespace zyeoman
// @description Generate readable password
// @include *
// @version 1
// @grant none
// ==/UserScript==
reg = /([^aeiou]*[aeiou]*([^aeiou]*([^aeiou][aeiou]+[^aeiou]*$)))/
host = /(?:\w+\.)*?([^\.]*)\.[^\.]*$/.exec(window.location.host) [1]
@zYeoman
zYeoman / compile.sh
Last active May 6, 2022 16:16 — forked from martinsik/index.html
Simple WebSocket server based on libwebsockets. For full description read http://martinsikora.com/libwebsockets-simple-websocket-server
gcc libwebsockets-websocket.c -L/usr/local/lib -lwebsockets
adb shell screenrecord --size 480x848 /sdcard/demo.mp4
adb pull /sdcard/demo.mp4
ffmpeg.exe -i demo.mp4 -filter:v "setpts=0.5*PTS" demo.gif
@zYeoman
zYeoman / duoshuo.css
Created March 18, 2017 15:29
多说评论css
#ds-reset a.ds-user-name[data-user-id='id']:after {
content: "魔法笔记的记录者";
margin-left: 6px;
font-size: 12px;
color: #13BF20;
background: rgba(255, 255, 255, .35);
border-radius: 4px;
padding: 0 3px;
}
#ds-thread #ds-reset li.ds-post-placeholder {
@zYeoman
zYeoman / Calendar.ini
Created September 20, 2017 14:41
我的Rainmeter设置
[Rainmeter]
BackgroundMode=1
AppVersion=14000
[Metadata]
Name=
Author=
Information=
License=
Version=
@zYeoman
zYeoman / hw4_1.m
Created December 9, 2017 14:07
数字图像技术第四次作业
%% 读取图片
img = imread('船.bmp');
%% 全局阈值二值化
bw = img>65;
figure;
imshow(bw);
%% 横向投影
ys = sum(bw,2);
figure;
plot(ys);
@zYeoman
zYeoman / Caddyfile
Created December 17, 2017 08:46
My Caddyfile for nextcloud
cloud.mickir.me:443 {
tls /etc/letsencrypt/live/cloud.mickir.me/fullchain.pem /etc/letsencrypt/live/cloud.mickir.me/privkey.pem
timeouts none
root /usr/share/webapps/nextcloud
log /home/mickir/caddy/access.log
errors /home/mickir/caddy/access.log
fastcgi / /run/php-fpm/php-fpm.sock php {
@zYeoman
zYeoman / byr.py
Last active November 4, 2019 10:29
自动从bt.byr.cn上下载免费种子文件,保存到指定位置
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2018 Yongwen Zhuang <zeoman@163.com>
#
# Distributed under terms of the MIT license.
"""
Byr
自动从bt.byr.cn上下载免费种子文件,保存到指定位置
@zYeoman
zYeoman / vimrc
Created July 10, 2018 08:12
My Vimrc
scriptencoding utf-8
" Title: Vimrc for windows and linux
" Maintainer: Yeoman Zhuang <zyeoman@163.com>
" Last Modified: 2018-07-08 23:03 +0800
" Startup {{{
if has('autocmd')
" Remove ALL autocommand for the current group
au!
endif