Skip to content

Instantly share code, notes, and snippets.

View xiaolitongxue666's full-sized avatar
🎯
I'm back

XiaoLi xiaolitongxue666

🎯
I'm back
View GitHub Profile
@DannyQuah
DannyQuah / 2022.01-D.Quah-Obsidian-iPad-syncing-via-iSH-git.md
Last active September 6, 2024 13:53
Obsidian on iPad syncing via iSH, git, and GitHub

Obsidian iPad syncing via iSH git

by Danny Quah, Jan 2022

This gist describes using Obsidian on iPad while syncing to other Obsidian platforms. The procedure uses git in iSH on iOS, and thus differs from using either Obsidian Sync or Working Copy as described in Obsidian/iOS+app.

(To be clear, Obsidian is one of my favourite Apps, and I'm all for supporting the team financially. Moreover, everything I've heard suggests the paid Obsidian Sync is excellent. However, I don't want my syncing processes to proliferate --- each service using a different client sync flow --- so I keep my systems minimal: just syncthing and git. After writing this I found an Obsidian Forum writeup which uses the same tools I do to achieve the same goal, but you'll want to read that with its accumulated contributions dispersed across the comments. So at least I was thinking

@qoomon
qoomon / youtube_clean_watch_later_videos.js
Last active October 17, 2024 22:07
Clean YouTube Watch Later Videos
// Version 2.0.1
// This script will remove all videos from watch later list
//
// Usage
//
// #1 go to https://www.youtube.com/playlist?list=WL
// #2 run following script in your browser console
(async function() {
const playlistName = document.querySelector('.metadata-wrapper #container #text')?.textContent || document.querySelector('#text')?.textContent
@liweinan
liweinan / fedora_bcc.md
Created August 8, 2020 15:48
fedora bcc

Fedora BCC Example

@alukach
alukach / app.yaml
Last active July 24, 2024 13:54
An example Github Actions for Python + Pipenv + Postgres + Pyright
# .github/workflows/app.yaml
name: My Python Project
on: push
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <tree_sitter/api.h>
#include <tree_sitter/highlight.h>
TSLanguage *tree_sitter_c();
int main() {
// Create a parser.
#!/bin/bash
ffmpeg -rtsp_transport tcp \
-i rtsp://smartiptv:[email protected]/Streaming/Channels/102 \
-i rtsp://smartiptv:[email protected]/Streaming/Channels/202 \
-i rtsp://smartiptv:[email protected]/Streaming/Channels/302 \
-i rtsp://smartiptv:[email protected]/Streaming/Channels/402 \
-i rtsp://smartiptv:[email protected]/Streaming/Channels/502 \
-i rtsp://smartiptv:[email protected]/Streaming/Channels/602 \
-filter_complex "
@qmdx00
qmdx00 / powershell_proxy
Created April 18, 2020 04:19
windows powershell proxy config
# file path:
# ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
function Set-Proxy
{
$proxy = 'http://127.0.0.1:1086'
# temporary
$env:HTTP_PROXY = $proxy
$env:HTTPS_PROXY = $proxy
#!/bin/bash
# data: 2020-03-31
# author: muzi502
# for: Fuck GFW and download some raw file form github without proxy using jsDelivr CDN
# usage: save the .she to your local such as /usr/bin/rawg, and chmod +x /usr/bin/rawg
# use rawg https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh to download
set -xue
# GitHub rul: https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh
# jsDelivr url: https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh/tools/install.sh
@jweinst1
jweinst1 / get_unix_time_insecs.rs
Created May 1, 2019 06:55
Using rust to get the unix time in seconds as a number.
use std::time::{SystemTime};
fn get_sys_time_in_secs() -> u64 {
match SystemTime::now().duration_since(SystemTime::UNIX_EPOCH) {
Ok(n) => n.as_secs(),
Err(_) => panic!("SystemTime before UNIX EPOCH!"),
}
}
@WestleyK
WestleyK / output-color.sh
Created August 15, 2018 01:19
printf color output
#!/bin/bash
#
# Created by: Westley K
# Date: Aug 14, 2018
#
# run this in your terminal, and
# you will get nice colors and effects!
#