Skip to content

Instantly share code, notes, and snippets.

View menyf's full-sized avatar
🎯
Focusing

Yifan Men menyf

🎯
Focusing
View GitHub Profile
@menyf
menyf / elpass.md
Last active March 14, 2023 09:47
From iCloud Keychain to Elpass

从iCloud Keychain到Elpass

运行环境

  1. macOS latest
  2. Python3

准备工作

  1. 下载mrc-converter-suite并解压
@menyf
menyf / helper.py
Created December 21, 2019 22:42
Including the url to domains
import sys
class MrCItem:
def __init__(self, vals):
# Title,"Login URL","Login Username","Login Password","Additional URLs"
self.title = vals[0]
self.loginURL = vals[1]
self.username = vals[2]
self.password = vals[3]
self.additionalURL = self.title if vals[4][:-1] == "" else (self.title + ";" + vals[4][:-1])
@menyf
menyf / wechat-tweak.md
Created January 8, 2019 16:15
WeChat Tweak Plugin Installation Guide
@menyf
menyf / DefaultKeyBinding.sh
Created January 7, 2019 21:57
Global Emacs Binding for macOS
mkdir ~/Library/KeyBindings
cat > ~/Library/KeyBindings/DefaultKeyBinding.dict <<EOF
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
;;; clang-format.el --- Format code using clang-format -*- lexical-binding: t; -*-
;; Keywords: tools, c
;; Package-Requires: ((cl-lib "0.3"))
;;; Commentary:
;; This package allows to filter code through clang-format to fix its formatting.
;; clang-format is a tool that formats C/C++/Obj-C code according to a set of
;; style options, see <http://clang.llvm.org/docs/ClangFormatStyleOptions.html>.
(defun copy-from-osx ()
(shell-command-to-string "pbpaste"))
(defun paste-to-osx (text &optional push)
(let ((process-connection-type nil))
(let ((proc (start-process"pbcopy" "*Messages*" "pbcopy")))
(process-send-string proc text)
(process-send-eof proc))))
(setq interprogram-cut-function 'paste-to-osx)
(setq interprogram-paste-function 'copy-from-osx)
import requests
import re
import json
class AutoPunch:
def __init__(self, username, pwd):
self.username = username
self.pwd = pwd
self.login_url = 'https://www.1point3acres.com/bbs/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1'
self.punch_url = 'https://www.1point3acres.com/bbs/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=1&sign_as=1&inajax=1'
class Animal{
public:
virtual Animal * getFather() {}
virtual Animal * getMother() {}
};
class Cat: public Animal {
public:
virtual Cat * getFather(){}
virtual Cat * getMother(){}
CFLAGS=-Wall -Werror -std=gnu++98 -pedantic -ggdb3
SRCS=$(wildcard *.cpp)
OBJS=$(patsubst %.cpp, %.o, $(SRCS))
PROGRAM=points
$(PROGRAM): $(OBJS)
g++ $(CFLAGS) -o $@ $(OBJS)
%.o: %.cpp point.h
g++ -c $(CFLAGS) $<
CFLAGS=-Wall -Werror -std=gnu++98 -pedantic -ggdb3
SRCS=$(wildcard *.cpp)
OBJS=$(patsubst %.cpp, %.o, $(SRCS))
PROGRAM=points
$(PROGRAM): $(OBJS)
g++ $(CFLAGS) -o $@ $(OBJS)
%.o: %.cpp point.h
g++ -c $(CFLAGS) $<