This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://talk.automators.fm/t/unminimize-windows-of-the-current-application/12360/5 | |
| tell application id ("com.apple.systemevents") ยฌ | |
| to tell (process 1 where it is frontmost) ยฌ | |
| to tell (windows whose attribute named "AXMinimized"'s value is true) ยฌ | |
| to if (it exists) then set the value of its attribute named "AXMinimized" of item 1 to false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://apple.stackexchange.com/questions/408019/dismiss-macos-big-sur-notifications-with-keyboard | |
| my closeNotif() | |
| on closeNotif() | |
| tell application "System Events" | |
| tell process "Notification Center" | |
| set theWindow to group 1 of UI element 1 of scroll area 1 of window "Notification Center" | |
| # click theWindow if you want to open the app | |
| set theActions to actions of theWindow | |
| repeat with theAction in theActions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://apple.stackexchange.com/questions/408019/dismiss-macos-big-sur-notifications-with-keyboard | |
| my closeNotif() | |
| on closeNotif() | |
| tell application "System Events" | |
| tell process "Notification Center" | |
| set theWindow to group 1 of UI element 1 of scroll area 1 of window "Notification Center" | |
| # click theWindow if you want to open the app | |
| set theActions to actions of theWindow | |
| repeat with theAction in theActions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Threadhold ๊ฐ (30%) ์ด์ CPU ์ ์ ํ๊ณ ์๋ ํ๋ก์ธ์ค ์ค ๊ฐ์ฅ ๋์ CPU ์ ์ ํ๊ณ ์๋ ํ๋ก์ธ์ค ๋ฐํํฉ๋๋ค. | |
| # Better Touch Tool๊ณผ ์ฐ๋ํ์ฌ TaskBar์ ๋ ธ์ถ์ํค๊ธฐ ์ํด ์ฌ์ฉํ๊ฑฐ๋ | |
| # TextBar http://richsomerfield.com/apps/textbar/ ์ ํจ๊ป ์ฌ์ฉํ ์ ์์ต๋๋ค. | |
| # 5์ด์ ํ๋ฒ ์ ๋ ์คํํ๋๋ก ์ค์ ํ๋ฉด ์ ๋นํฉ๋๋ค. | |
| # | |
| # https://stackoverflow.com/questions/24129903/notifying-when-using-high-cpu-via-applescript-or-automator | |
| SAMPLE_SIZE=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ SAMPLE_SIZE=3 | |
| DELAY_SECS=1 | |
| TOP_APP_NUM=5 # number of apps to sum up | |
| $ /usr/bin/top -s $DELAY_SECS -l $SAMPLE_SIZE -n $TOP_APP_NUM -F -o cpu -stats cpu,pid,command | \ | |
| grep -A$TOP_APP_NUM "%CPU" | |
| %CPU PID COMMAND | |
| 0.0 99989 fish | |
| 0.0 99752 mdworker_shared | |
| 0.0 99640 CategoriesServic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class IfAndSwitch { | |
| public static void ifFunc(int v) { | |
| if (v == 1) { | |
| System.out.println(1); | |
| } else if (v == 2) { | |
| System.out.println(2); | |
| } | |
| } | |
| public static void switchFunc(int v) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Person { | |
| int age = 10; | |
| public int getAge() { | |
| return age; | |
| } | |
| public void setAge(int age) { | |
| this.age = age; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){if(location.host!='twitter.com')return;var hide=function(){$('.stream-item').has('.twitter-atreply').hide()};hide();$(document).ajaxSuccess(function(){setTimeout(hide,100)})})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| if (location.host != 'twitter.com') | |
| return; | |
| var hide = function() { | |
| $('.stream-item').has('.twitter-atreply').hide(); | |
| }; | |
| hide(); | |
| $(document).ajaxSuccess(function() { |