Skip to content

Instantly share code, notes, and snippets.

@goooooouwa
goooooouwa / openwrt-how-to-mount-smb-folder
Created February 26, 2023 01:07
openwrt mount smb folder
mount -t cifs -o vers=2.0,username=admin,password=pass,iocharset=utf8 //192.168.50.51/homes /mnt/homes/
@goooooouwa
goooooouwa / list-folder-size.sh
Created February 26, 2023 09:32
show folder size
du -h --max-depth=1
xargs -n 1 curl -O --retry 999 --retry-max-time 0 -C - < ./mp3-urls-unique-id-fix.txt
import interact from "interactjs";
import React, { useEffect, useState } from "react";
export default function Draggable() {
const [positionX, setPositionX] = useState(0);
// This issue has to do with the following combination:
// - add interactjs event listeners inside useEffect
// - set react useEffect dependency list as []
// - call react setState method inside event listeners
cat $BIN_FILE | tr -d '\0' > $NEW_FILE
@goooooouwa
goooooouwa / common-shell-commands.sh
Last active November 22, 2021 07:38
common shell commands
#!/bin/bash
# bash for loop
for i in $(seq 10 $END); do
echo $i
done
# 1.Iterate over collection
for i in a b c; do
echo $i
#!/bin/bash
echo INFO: host: red hat 9.0 with all packages in installation CDs installed.
echo INFO: target: armv4tl Linux 2.6.12-h1940 libc 2.3.2
echo INFO: all operations are executed under root
#build mode
INSTALL_CROSSTOOL=""
COPY_LIBS=""
COMPILE_QT=""
@goooooouwa
goooooouwa / CardDiaryTXT.txt
Last active January 14, 2020 09:50
break CardDiary export txt file into individual diary txt files with date as title. So that I can import these text files into Evernote.
Date: 2018-09-25 16:29:58
Weather: Cloudy
Demo diary post 1
Date: 2018-09-26 19:05:07
Weather: Mostly Cloudy Day
Demo diary post 2
@goooooouwa
goooooouwa / Subscriptions.opml
Created January 14, 2020 09:42
extract rss feed urls from opml file
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions - RSS</title>
</head>
<body>
<outline htmlUrl="http://newworldinteractive.com" title="Blog – New World Interactive" xmlUrl="http://newworldinteractive.com/blog/feed/" type="rss" text="Blog – New World Interactive"/>
<outline htmlUrl="http://www.steampowered.com/" title="New On Steam" xmlUrl="https://store.steampowered.com/feeds/newreleases.xml" type="rss" text="New On Steam"/>
<outline htmlUrl="https://goooooouwa.github.io/" title="Shunfa’s Blog" xmlUrl="https://goooooouwa.github.io/feed.xml" type="rss" text="Shunfa’s Blog"/>
<outline title="test" xmlUrl="tag/test" type="rss" text="test"/>
title layout category tags
How to convert outline text to mindmap
post
productivity
outline, freemind, mindmap

Requirements: