Skip to content

Instantly share code, notes, and snippets.

View chengyus's full-sized avatar

Joseph Sung chengyus

View GitHub Profile
@chengyus
chengyus / MonkeyFinderHybrid.csproj.linux
Last active March 10, 2025 03:44
Changes mostly on Line 4; and this is for use when editing Part 1 of the video workshop "Blazor Hybrid: Build Cross-Platform Apps with .NET MAUI" at https://youtu.be/Ou0k5XKcIh4?si=aWdF6yjL733sOMkU by Gerald Versluis.; the 2nd file MonkeyService.cs points the JSON to the github raw content of the equivalent list.
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
@chengyus
chengyus / .gitignore
Last active September 22, 2023 04:01
.gitignore file for Unreal Engine 5.1 -> 5.3 (ignoring VSCode and my project case for learning Unreal Engine 5 YT tutorials)
.vs*
*.code-workspace
*.sln
Content/Developers
DerivedDataCache
Intermediate
Saved
Binaries
@chengyus
chengyus / slides_parsing.rb
Last active July 21, 2023 00:48
This is the Ruby shell script I came up with on 2023-07-11; The purpose is for extracting Song title information in a particular slide and organizing them into a pure text file listing song information. ( One can later just use grep among the Song_Lists directory to speed up the search ).
#!/usr/share/rvm/rubies/ruby-3.2.2/bin/ruby
require 'rubygems'
require 'date'
require 'ruby_powerpoint'
dir_name = "Song_Lists"
Dir.mkdir(dir_name) if !Dir.exist?(dir_name)
starting_date = ARGV[0] if ARGV && ARGV[0].length == 8 # in form of "20211024" 8 digit date
end_date = ARGV[1] if ARGV && ARGV[1].length == 8
@chengyus
chengyus / check_keyword_first_match_deck.sh
Created July 11, 2023 05:06
this is a shell script to help with the church's slides; it uses zipgrep to check for keyword as the first argument to the script. Initial version actually also extract certain meta file from pptx, but this version just uses slide content to check for keyword. (slows down showwhat on Cygwin on Win11, maybe due to SSD bugs, but on Linux it is rea…
echo $1
for f in *.pptx
do
output=$(zipgrep -Hl $1 $f ppt/slides/slide*.xml)
status=$?
if [ $status -eq 0 ]
then
echo $f
echo "$1 match in $f"
break
@chengyus
chengyus / parse_act_journal.rb
Created April 22, 2011 00:29
Purpose: A Gnotime Activity Journal HTML parse to .csv shell script; I use it for copying/pasting to a timesheet template to save some typing. Editor used: vim/gvim
require 'rubygems'
require 'nokogiri'
require 'fastercsv'
require 'htmlentities'
#puts $ARGV[0];
doc = Nokogiri::HTML( File.read($ARGV[0]) )
memo = [] #memo array
elapsed = [] #elapsed array