Skip to content

Instantly share code, notes, and snippets.

View ConteMan's full-sized avatar
Keep Coding

ConteMan ConteMan

Keep Coding
View GitHub Profile
@ConteMan
ConteMan / editor.css
Created October 1, 2022 16:38
Obsidian plugin. Better Command Palette. Simple style.
/* Better Command Palette */
.better-command-palette .better-command-palette-title {
display: none;
}
.suggestion-prefix:after {
content: ": ";
}
.better-command-palette .suggestion-item {
display: flex;
flex-wrap: wrap;
@ConteMan
ConteMan / douban_movie_page_to_json.js
Created June 11, 2022 14:06
Douban movie page data to json
const elArr = document.querySelector('#wrapper > #content .subjectwrap .subject #info').innerHTML.toString().split('<br>');
const mDOMParser = new DOMParser();
const mData = {}
const title = document.querySelector('#wrapper > #content > h1 span[property="v:itemreviewed"]').innerText
Object.assign(mData, { '片名': title })
elArr.forEach(item => {
const mDom = mDOMParser.parseFromString(item, 'text/html')
const pl = mDom.querySelector('.pl')
if (!pl) return
const mKey = pl.innerText.replace(/:|:/, '')
@ConteMan
ConteMan / auto_restart_alt_tab.sh
Created December 12, 2020 23:05
auto open AltTab
#!/bin/zsh
count=$(ps -ef | grep -i '/Applications/AltTab.app' | grep -vc 'grep')
if [ $count -eq 0 ]
then
open /Applications/AltTab.app
echo 'Open AltTab now'
fi