Skip to content

Instantly share code, notes, and snippets.

View yujinlin0224's full-sized avatar
🏳️‍⚧️

Yùjǐn Lín yujinlin0224

🏳️‍⚧️
View GitHub Profile
@yujinlin0224
yujinlin0224 / NDHUGetCoursesPeopleAreSelected.user.js
Last active December 24, 2018 16:50
Get the number that people are selected in each course in NDHU Course selection system.
// ==UserScript==
// @name NDHUGetCoursesPeopleAreSelected.user.js
// @version 1.2
// @namespace https://yurina.xyz/
// @downloadURL https://gist.github.com/abc1236762/3ec5cae1af8be4c3745db2db8cec6b83/raw/NDHUGetCoursesPeopleAreSelected.user.js
// @homepageURL https://github.com/abc1236762
// @author abc1236762
// @description Get the number that people are selected in each course in NDHU Course selection system.
// @include http*://sys.ndhu.edu.tw/AA/CLASS/subjselect/*
// @grant GM_addStyle
@yujinlin0224
yujinlin0224 / FacebookMostRecent.user.js
Last active October 6, 2020 15:42
Let Facebook's news feed always show "Most Recent".
// ==UserScript==
// @name Facebook Most Recent
// @version 1.5
// @namespace https://yurina.xyz/
// @downloadURL https://gist.github.com/abc1236762/2fce8e5a9827693683b6831a805eaa85/raw/FacebookMostRecent.user.js
// @homepageURL https://github.com/abc1236762
// @author abc1236762
// @description Let Facebook's news feed always show "Most Recent".
// @include http*://www.facebook.com/*
// ==/UserScript==
@yujinlin0224
yujinlin0224 / extensions.json
Last active August 19, 2022 15:12
Visual Studio Code Settings
[
{
"identifier": {
"id": "vscode.bat"
},
"preRelease": false,
"version": "1.0.0"
},
{
"identifier": {
@yujinlin0224
yujinlin0224 / NDHUFinishTeachingFeedbackInstantly.user.js
Last active December 16, 2019 14:07
Finish teaching feedback instantly in NDHU teaching feedback system.
// ==UserScript==
// @name NDHU Finish Teaching Feedback Instantly
// @version 1.0
// @namespace https://yurina.xyz/
// @downloadURL https://gist.github.com/abc1236762/774f29980721af5aec33ccfcb314373a/raw/NDHUFinishTeachingFeedbackInstantly.user.js
// @homepageURL https://github.com/abc1236762
// @author abc1236762
// @description Finish teaching feedback instantly in NDHU teaching feedback system.
// @include http*://sys.ndhu.edu.tw/AA/CLASS/SubjEvaluate/fill-evalu.aspx*
// @run-at document-idle
@yujinlin0224
yujinlin0224 / create_ros_env_with_py3.bash
Last active June 2, 2020 13:06
Create ROS Melodic Morenia Environment with Python 3
#!/bin/bash
# Prepare
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add -
sudo apt update -y
sudo apt install -y python3 python3-pip python3-virtualenv virtualenv
sudo apt install -y make cmake gcc g++ wget qt5-default libopencv=3.* python-rosdep
@yujinlin0224
yujinlin0224 / Vote.sol
Last active June 16, 2020 05:20
選舉投票
// SPDX-License-Identifier: MIT
pragma solidity >=0.6;
/// @title 選舉投票
contract Vote {
// 投票者
struct Voter {
string id; // 身分證字號
bool canVote; // 是否能投票
@yujinlin0224
yujinlin0224 / DmhyAddDownloadTorrentFileColumn.user.js
Last active June 4, 2022 11:30
DMHY Add Download Torrent File Column
// ==UserScript==
// @name DMHY Add Download Torrent File Column
// @version 1.3
// @namespace https://yurina.dev/
// @downloadURL https://gist.github.com/yujinlin0224/161893f118dea3fbe6fe3c55ba258d12/raw/DmhyAddDownloadTorrentFileColumn.user.js
// @homepageURL https://github.com/yujinlin0224
// @author yujinlin0224
// @description DMHY Add Download Torrent File Column
// @include /^https?://((www|share)\.)?dmhy\.org(/.*)?$/
// @require https://raw.github.com/emn178/hi-base32/master/build/base32.min.js
@yujinlin0224
yujinlin0224 / RedirectMobileToDesktop.user.js
Last active May 11, 2024 16:15
Redirect mobile version of website to desktop version. Supports Facebook, Twitter, Wikipedia and more (in the future).
// ==UserScript==
// @name Redirect Mobile To Desktop
// @version 2.0
// @namespace https://yurina.dev/
// @downloadURL https://gist.github.com/yujinlin0224/e40b68374b7fc8e4549333a83b7cfbd1/raw/RedirectMobileToDesktop.user.js
// @updateURL https://gist.github.com/yujinlin0224/e40b68374b7fc8e4549333a83b7cfbd1/raw/RedirectMobileToDesktop.user.js
// @homepageURL https://github.com/yujinlin0224
// @author yujinlin0224
// @description Redirect mobile version of website to desktop version
// @match http*://m.facebook.com/*
@yujinlin0224
yujinlin0224 / InstallWindowsRedists.ps1
Last active February 28, 2023 11:39
[Deprecated, use winget instead] Install all redistributable packages for Windows, including Microsoft Visual C++ 2005-2022 Redistributable Packages and DirectX End-User Runtime.
$tempPath = [System.IO.Path]::GetTempPath()
$vcredistUrlTable = [ordered]@{
'2005'=[ordered]@{
'x86'='https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE'
'x64'='https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.EXE'
}
'2008'=[ordered]@{
'x86'='https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe'
'x64'='https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe'
@yujinlin0224
yujinlin0224 / MouseNaturalScrolling.ps1
Created August 21, 2022 01:39
Make all mice in Windows scrolling like macOS (natural/reverse mouse scrolling)
Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Enum\HID' -Include 'Device Parameters' `
-Recurse -Depth 2 -ErrorAction 'SilentlyContinue' |
Select-Object -ExpandProperty PSPath |
Where-Object { (Get-Item $_).Property -Contains 'FlipFlopWheel' } |
ForEach-Object { Set-ItemProperty $_ 'FlipFlopWheel' -Value 1 }