Skip to content

Instantly share code, notes, and snippets.

View fakeyanss's full-sized avatar
🤪
Focusing

fakeyanss

🤪
Focusing
View GitHub Profile
@fakeyanss
fakeyanss / actionlist.vim
Created February 26, 2024 12:35 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@fakeyanss
fakeyanss / README.md
Created December 6, 2022 09:10 — forked from chuyik/README.md
macOS 给 Git(Github) 设置代理(HTTP/SSH)
@fakeyanss
fakeyanss / hosts
Last active January 30, 2021 12:45
my hosts file
172.64.68.166 pv.foreti.me
@fakeyanss
fakeyanss / zhihu_novels_spider.py
Created September 29, 2019 15:21
统计知乎问题:有哪些可称为「神作」的网络小说?所有答案推荐的书名出现次数,https://www.zhihu.com/question/37985771
import csv
import os
import re
from functools import reduce
import requests
# 知乎有反爬虫,加入http headers伪装浏览器
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36",
@fakeyanss
fakeyanss / install-oh-my-zsh.sh
Created May 13, 2019 07:20 — forked from hewerthomn/install-oh-my-zsh.sh
Offline install of oh-my-zsh on Ubuntu
main() {
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Simple HTTP Server With Upload based on python3.
Python2-Version by [bones7456] and [BUPTGuo]:
This module builds on BaseHTTPServer by implementing the standard GET and HEAD requests in a fairly straightforward manner.
Python3-Version by [FrozenMap]:
Based on the new features in python3, this module is built on [http.server] by rewriting some implementations of do_GET, do_HEAD and do_POST and other functions in Python2-Version.
20181029 Update:
With the help of [a.7], we can now upload multiple files together, rather than one file at a time
More details can be found on the blog with the link below:
@fakeyanss
fakeyanss / listen1_aha_playlist.md
Last active September 22, 2020 09:28
updated by Listen1(http://listen1.github.io/listen1/) at 2020/9/22 下午5:28:20

本歌单由Listen1创建, 歌曲数:218,歌单数:2,点击查看更多

luit的安装也非常简单
```
wget -c ftp://invisible-island.net/luit/luit.tar.gz
tar -xzvf luit.tar.gz
cd luit-20141204/
./configure
make
make install
```
/**
* Fluent API + Singleton
*
* Created by yanss on 2018/9/13.
*/
public class Fluent {
private String name;
private int age;
@fakeyanss
fakeyanss / gist:f9c33b1061c9dd6ca9917e93a4309049
Last active February 21, 2019 09:17
java-mysql-connect
public class Mysql2 {
// JDBC 驱动名及数据库 URL
static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
static final String DB_URL = "jdbc:mysql://host:3306/dbname";
// 数据库的用户名与密码,需要根据自己的设置
static final String USER = "user";
static final String PASS = "password";
public static void main(String[] args) {