ãªã¢ã¼ãã¯ã¼ã¯ã§éå¤å¾ã«ãã³ã·ã§ã³ãä¸ããããã®æè¡
ãã®è¨äºã¯ãã¯ã¦ãªã¨ã³ã¸ãã¢Advent Calendar 2023 ã®2024å¹´1æ9æ¥ã®è¨äºã§ãã
æ¨æ¥ã¯id:arthur-1ããã® Advent Calendarを25日分続ける技術、あるいは物を発明し素早く作る技術 - Diary of a Perpetual Student ã§ãããã¢ã¦ãããããç¶ããªãç§ã¨ãã¦ã¯25æ¥ãç¶ããã®ã¯å°æ¬ã§ããè¦ç¿ãããâ¦
å¼ç¤¾ã¯ãã«ãªã¢ã¼ãã§åããã¨ãå¯è½*1ã§ãéå¤ãè¦æãªèªåã«ã¨ã£ã¦ã¯å¤©å½ã§ãããããããªã¢ã¼ãã§åãã¦ããã¨æ¥ã ã«ã¡ãªããªãç¡ããä»äºãçµãã¦ããã³ã·ã§ã³ãä¸ãããªããªâ¦ã¨æãã¦ãã¾ããã
ããã§ãéå¤ãã¿ã³ãæ¼ããæã«ãã³ã·ã§ã³ãä¸ããããã®æè¡ãå°å ¥ãã¾ããã
ç¨æããã®ã¯ãã¡ãã®ã¢ã¤ãã ã§ãã
æ©éã§ãããå®éã«éå¤ãã¿ã³ãæ¼ããéã®æ§åãã覧ãã ããã
ð·ðððð ð»ððð ...
ã©ãã§ããï¼ãã³ã·ã§ã³ãä¸ããããã§ãããï¼BGM ã¯æ¨©å©ã®åé¡ä¸ããªã¼ã®é³æºã«å¤ãã¦ãã¾ãããå®éã«ã¯ Get Wild ãæµãã¦ãã¾ãã
ä½ãæ¹
æºå
ã¾ãã¯ã¹ãã¼ããã©ã°ã¨ãã©ã¼ãã¼ã«ãã³ã³ã»ã³ãã«ç¹ããIFTTT çµç±ã§ãªã³ãªãã§ããããã«ãã¾ãããã®è¾ºã®è©³ç´°ã¯ä»¥å 在宅ワーク中に家族に会議中だとアピールするライフハック - magamingのブログã§æ¸ããã®ã§ããã¡ããè¦ã¦ãããã¨ããããã§ãã
ã¹ãã¼ããã©ã°ã§ãªãã¦ãã赤å¤ç·ãªã¢ã³ã³ãã¤ãã¦ãããã©ã¼ãã¼ã«ããNature Remo ã SwitchBot ãªã©ã®ã¹ãã¼ããªã¢ã³ã³ã§æä½ããå½¢ã§ãããã¨æãã¾ãã
ã¹ã¯ãªããã®ä½æ
å¼ç¤¾ã§ã¯å¤æ ã·ã¹ãã ã« Akashi ãå©ç¨ãã¦ããã®ã§ããã©ã¦ã¶ä¸ã§å¤æ 管çãã§ãã¾ãããããä½ãæå³ããããã¤ã¾ããJavaScript ãåãè¾¼ã¿æ¾é¡ã¨ããäºã§ããä»åã¯ä»¥ä¸ã®ãã㪠JS ãç¨æãã¾ããã
const iftttUrl = '<IFTTT ã§ã¹ãã¼ããã©ã°ãONã«ããããã®URL>'; // GetWild const videoId = 'NHKq8IOXPxA'; const playerElement = document.createElement('div'); playerElement.id = 'player'; document.body.appendChild(playerElement); const tag = document.createElement('script'); tag.src ='https://www.youtube.com/iframe_api'; const firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player; function onYouTubeIframeAPIReady() { player = new YT.Player('player', { // é³ã ãåçã§ããã°ããã®ã§ããµã¤ãºã¯ 0 height: '0', width: '0', videoId: videoId, }); } const partyTime = () => { fetch(iftttUrl); // ifttt ã«ããã¹ã¤ãããªã³ã«ã¿ã¤ã ã©ã°ãããã®ã§1ç§å¾ 㤠setTimeout(() => { // ãµãã¾ã§ã·ã¼ã¯ player.seekTo(60); player.playVideo(); },ã1000); } const taikinButton = document.querySelector(<éå¤ãã¿ã³ã® class>); taikinButton.addEventListener('click', partyTime);
è¦ã¯ iframe ã® Player ãç¡çããåãè¾¼ãã§ãéå¤ãã¿ã³ãæ¼ããããIFTTT URL ãå©ãããYoutube Player API ã§åçãããã£ã¦ããã ãã§ãã
ã¹ã¯ãªããã®åãè¾¼ã¿
æå㯠Chrome æ¡å¼µä½ãããã¨æã£ã¦ã¾ããããããã©ããªã£ã¦ããã®ã§ä»å㯠ScriptAutoRunner ã§éã« JS ãå®è¡ããå½¢ã«ãã¾ãããä»åã®ããã«ãéã«JSã§éã³ããã¨ãã«ã¯ãªã¹ã¹ã¡ã§ãããã©ã¦ã¶ä¸ã§åãå¤æ ã·ã¹ãã ã§ããã°ãAkashi ã§ãªãã¦ãå°å ¥å¯è½ãªã¯ãã§ãã
ãããã§ãããï¼çæ§ãéå¤ã«å½©ããä¸ãã¦ã¿ã¦ã¯ãããã§ãããããããã§ã¯ããéå¤ã©ã¤ããâ¦
GitHub actions 㧠PR ãç¡ããã°ä½ããããã°æ´æ°ãã
ãããªæãã§ã§ãããgh pr list ã§æ¨æºã§ jq 使ãããã¨ãä»åã®çºè¦ããã£ãããã
env: TARGET_BRANCH: 'target-branch' GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: create-or-update-pr: runs-on: ubuntu-latest steps: - name: search pr number and set to env # ãã®å ´å㯠head ã 'target-branch' ãã¤ãã¼ã¸ããã¦ãªããã©ã³ããæ¢ãã¦ãã run: echo "PR_NUMBER=$(gh pr list --search "head:${{ env.TARGET_BRANCH }} is:unmerged" --json number --jq ".[].number")" >> $GITHUB_ENV - name: create pull request # 空ãªã 0 ãå ¥ã ref. https://docs.github.com/ja/actions/learn-github-actions/expressions#operators if: ${{ env.PR_NUMBER == 0 }} run: gh pr create --base main --head ${{ env.TARGET_BRANCH }} --title "ã¿ã¤ãã«" --body "æ¬æ" - name: update pull request if: ${{ env.PR_NUMBER != 0 }} run: gh pr edit ${{ env.PR_NUMBER }} --title "æ´æ°å¾ã®ã¿ã¤ãã«" --body "æ´æ°å¾ã®æ¬æ"
MySQL ã§ãã¼ãã«å®ç¾©ã JSONå½¢å¼ã§åãåºã
諸äºæ ã§ãã¼ãã«åã¨ããã¼ãã«ã®ã«ã©ã ã以ä¸ã®ãã㪠JSON å½¢å¼ã§åºãå¿ è¦ããã£ãã
{ "<ãã¼ãã«å1>": [ "<ã«ã©ã å1>", "<ã«ã©ã å2>", ... ], "<ãã¼ãã«å2>": [ "<ã«ã©ã å1>", "<ã«ã©ã å2>", ... ] }
æå㯠MySQL ã§ãã¼ãã«å®ç¾©ã csv ã«åãåºãã¦ãã¹ãã¬ããã·ã¼ãã«è²¼ãä»ãã¦ãGAS 㧠JSON å½¢å¼ã«å¤æãã⦠ã¿ãããªåããã©ããã¨ããã£ã¦ãããã©ãJSON å¨ãã®é¢æ°ã使ãã°ã©ããã MySQL ä¸çºã§ããããã ã£ãã
SELECT JSON_OBJECTAGG( c1.table_name, ( SELECT JSON_ARRAYAGG(column_name) FROM information_schema.columns as c2 WHERE c2.table_name = c1.table_name ) ) FROM information_schema.columns as c1 WHERE table_schema = '<DBå>' ;
ãããã®é¢æ°ã¯ MySQL 5.7.22 以éãªã使ãã模æ§ã ãã©ãsort ã«ã¯æªå¯¾å¿ã£ã½ãã®ã§ããæãã«ä¸¦ã¹æ¿ããããªãå¥ãªæ¹æ³ãåãå¿ è¦ãããããã
Aggregates a result set as a single JSON array whose elements consist of the rows. The order of elements in this array is undefined.
MySQL :: MySQL 8.0 Reference Manual :: 12.19.1 Aggregate Function Descriptions
ãGraphQLãä½ããã®æ¡ä»¶ã§ä½ãããéãã¦ãããã£ã¼ã«ãã®è¨è¨ãã©ãããï¼
ä½ãè¨ã£ã¦ãããããããªãã¨æããã©ãä¾ãã°ã1é±é以å ã«æ°è¦ç»é²ããã¦ã¼ã¶ã¼ä¸è¦§ãè¿ããã¿ãããªãã£ã¼ã«ããã©ãè¨è¨ãããã¨ãã話ãããã¤ããã¿ã¼ã³ãããããã
1. å°ç¨ã®ãã£ã¼ã«ããç¨æãã
query { recentlyRegisteredUsers: [User!]! }
ã¯ã©ã¤ã¢ã³ãããã¯ãã®ãã£ã¼ã«ãå¼ã¹ã°ããã ããªã®ã§æ¥½ããã ããæ°ãã«ãæè¿æ´æ°ããã£ãã¦ã¼ã¶ã¼ä¸è¦§ãè¿ããããã®ãããªè¦æãã§ã¦ããããä¼¼ããããªãã£ã¼ã«ããç¡å°½èµã«å¢ãã¦ããå¯è½æ§ãããã
2. å ¨é¨è¿ããã£ã¼ã«ããç¹å®ã®æ¡ä»¶ã§ãã£ã«ã¿ã§ããããã«ãã
query { users( filter: UserFilter ): [User!]! } enum UserFilter { "1é±é以å ã«æ°è¦ç»é²ããã¦ã¼ã¶ã¼" RECENTLY_REGISTERED }
1 ããã¯ãã£ã¼ã«ãã®æ²»å®ã¯ä¿ããããã ãã©ã代ããã«ãã£ã«ã¿æ¡ä»¶ãå¢ãã¦ãããã¨ã«ãªãã
3. æ¤ç´¢ç¨ã®ãã£ã¼ã«ããç¨æãã
query { searchUser( registeredSince: DateTime, registeredUntil: DateTime ): [User!]! }
2 ã¨ä¼¼ã¦ããã©ãã¯ã©ã¤ã¢ã³ãå´ããæ¤ç´¢æ¡ä»¶ãæå®ããã¿ã¤ããã·ã³ãã«ãªæ¤ç´¢æ¡ä»¶ãªãããã§ãããã©ãè¤éã«ãªã£ã¦ããã¨ã¯ã©ã¤ã¢ã³ãå´ããã®ã¯ã¨ãªã大å¤ãªãã¨ã«ãªãããã ããæ¤ç´¢æ¡ä»¶ã®ãªãã·ã§ã³ãå¢ãã¾ãã£ã¦å¤§å¤ã«ãªãããã
4. queryString ã§æ¤ç´¢ã§ããããã«ãã
query { searchUser( query: String ): [User!]! }
ã¯ã¨ãªæååã§ãªãã§ãæ¤ç´¢ããæ¹å¼ããã¡ããã·ã³ãã«ãªæ¤ç´¢æ¡ä»¶ãªããããã©ãè¤éã«ãªã£ã¦ããã¨ã¯ã¨ãªãçµã¿ç«ã¦ãã®ã大å¤ã«ãªããããqueryString ããã¼ã¹ããå¿ è¦ãããã®ã§ããã¯ã¨ã³ãã®å®è£ ã¯ä»ã®æ¡ã¨æ¯ã¹ã¦è¤éã«ãªãããã
çµå±ã©ããããï¼
以ä¸ã®ãããªæ¹éãè¯ãæ°ããã¦ããã
æ¤ç´¢æ¡ä»¶ãã·ã³ãã«ãªããæ¤ç´¢ç¨ãã£ã¼ã«ãããæ¤ç´¢ã§ããããã«ãã
ä»åã®ä¾ãªããã¦ã¼ã¶ã¼ã®ç»é²ææã§æ¤ç´¢ã¨ãã¯æ±ç¨çãªè¦ä»¶ãªã®ã§ãã¡ããããã®ããï¼
æ¤ç´¢æ¡ä»¶ãè¤éãªããå°ç¨ã®ãã£ã¼ã«ããç¨æãã
ä¾ãã°ã1ã¶æ以å ã«ç»é²ãã¦ããªããã¤1é±é以å ã«5å以ä¸æ´æ°ããã£ããã¬ãã¢ã ç»é²æ¸ã¿ã®ã¦ã¼ã¶ã¼ä¸è¦§ãã¿ãããªæ¡ä»¶ã ã¨ç¹æ®ãªè¦ä»¶ãããã®ã§ãã¡ããããã®ããï¼
ä»ã«ä½ããªã¹ã¹ã¡ãã£ããæãã¦ãã ããï¼
ãã¼ãã¼ãã¨ãã¦ã¹ãæ°ãããã
ä»ã¾ã§æ®éã®ãã³ãã¼ã¬ã¹ã®ãã¼ãã¼ãã使ã£ã¦ãããã ãã©ãFPS ããã¬ã¤ããã¨ãã«ãã¦ã¹ãå½ãã£ã¦ãã¾ã£ã¦ã¨ã¤ã ã®éªéã«ãªãã®ã§60%ãã¼ãã¼ããè²·ã£ãã
Ducky One 3 Mini 60% keyboard Classic Pure White
ã¨ã³ã¿ã¼ãã¼ã®è²ãéãã®ãããããããã£ã¡ãå ã£ã¦ããã©ãã©ã¤ããã¿ã¼ã³10åããããã£ã¦æ§ãããªã®ãé¸ã¹ãã®ã§ããã
ãã£ãããããã¼ãã¼ãè²·ã£ãã®ã§ãä»äºç¨ã® Mac Book Pro ã§ã使ã£ã¦ãããä»ã¾ã§ã¯å¨ãã HHKB ã¨ã使ã£ã¦ããã®ãè¦ã¦ãããã¼ãã¼ãè²·ã£ãã¨ããã§ã¿ã¤ãã³ã°é度ãªãã¦ãããªå¤ãããªããï¼ãã¨å·ããç®ã§è¦ã¦é ãªã« Mac Book ã®ä»å±ã®ãã¼ãã¼ãã使ã£ã¦ãããã©ããã°ãã使ã£ãã¨ããã確ãã«ã¿ã¤ãã³ã°é度ã¯å¥ã«å¤ãããªããã©æ°ã«å ¥ã£ãã¬ã¸ã§ãã使ã£ã¦ãã¨æ°åã¯ä¸ãã£ã¦ãããªãã¨ãªã£ãï¼æã®ã²ãé«éå転ï¼ã
ãã¦ã¹ãã¤ãã§ã«æ°ãããã¦G PRO X SUPERLIGHT ã«ãããã ãã©ãMac ã§ä½¿ãã¨ãã«ãã¦ã¹å éãéªéãããã®ã§ LinearMouse ãå ¥ãã¦åã£ã¦ãããMac 使ã£ã¦ãã¨ãããããã®ããããã¢ããªã±ã¼ã·ã§ã³å ¥ããªãã¨è¨å®ã§ããªãã®ã¤ãã¤ãã ããªãã£ã¦æããã¢ããªã±ã¼ã·ã§ã³ãã¨ã«é³éãããããªãã¨ããWindows ãªãããããã®ã¯ OS æ¨æºã§ã§ããã®ã«â¦
ãªã FPS ã¯å ¨ç¶ä¸æããªã£ã¦ãªãæ§åã
ChatGPT ã«ãã¼ã ãã¼ã¸ãä½ã£ã¦ããã
ç¬èªãã¡ã¤ã³åã£ãã®ã§èªå·±ç´¹ä»ãµã¤ãã§ãä½ããããªãã¨æã£ããã©ãæ¥ã«ããã©ããããªã£ãã®ã§ ChatGPT ã«ä½ã£ã¦ããã£ãã
ãããªæãã«ãªã£ãã
ãããã«ãªã³ã¯ãããã®ãå«ãªã®ã§å¤ãã¦ãããã
ã¡ããã¨å¤ãã¦ããããåªç§ã
ã¿ã¤ãã«ãå¤ãã¦ããã£ãããchatGPT ã§ä½ã£ã¦ãã¾ãã¨ãã注éãå ¥ããããããã¿ãæ¶ãã¦ããã£ãããã¢ã¤ã³ã³ãè¨ç½®ãã¦ããã£ããããã
æçµçã«åºæ¥ä¸ãã£ãã®ããã¡ãã
Font Awesome ã®ãã¼ãã®ä»æ¹ãã¡ãã£ã¨ééã£ã¦ã¦ã¢ã¤ã³ã³èªã¿è¾¼ã¾ããã£ãã®ã§ããã¯æã§ç´ãããã©ããªããããæãã«ãªã£ãæ°ãããã5åãããã§ã§ããã®ã§ããããå°ä½ãã¨ãã¦ã¯ããããã
cookie ã«åæãããããã¢ãããæ¶ããã
GDPR ã®é¢é£ã§ãç¹ã«æµ·å¤ã®ãã¼ã¸ã«ã¢ã¯ã»ã¹ããã¨ããåã®ãã©ã¦ã¶ã® cookie 使ããã©ãããï¼ãã¨ãããããã¢ããæ¥ããã©åæã«ä½¿ã£ã¦ããâ¦ã¨ããæ°æã¡ã«ãªãã
åãããã«èãã¦ãã人ã¯å¤ãããã§ã I don't care about cookies 3.4.5 ã¨ãããã©ã¦ã¶æ¡å¼µæ©è½ãåå¨ãã¦ããæ§åã試ãã«ä½¿ã£ã¦ã¿ããã©ãä¸é¨ã®ãµã¤ãã§ã¯ãã¾ãåããªãã£ãã
å®è£ ãæ°ã«ãªã£ã¦è¦ã¦ã¿ãã¨ããµã¤ããã¨ã«ã«ã¼ã«ãåæããã¦ãã¦ããã®ãµã¤ãã¯DOMãé ãããã®ãµã¤ã㯠Cookie ã«å¤ãã»ãããã⦠ã¿ãããªãã¨ãæ¸ããã¦ãããããã¦ãã®ãªã¹ãã«è¿½å ãããå ´åã¯ããªã¯ã¨ã¹ããéãã¨è¿½å ããã(å¯è½æ§ããã)ä¸ç観ã®ããã
I-Dont-Care-About-Cookies/rules.js at master · appeasementPolitik/I-Dont-Care-About-Cookies · GitHub
ãµã¤ãã«ãã£ã¦å®è£ ã¯ãã©ãã©ãªã®ã§ãããããããªãããªãã¨æãã¤ã¤ãããªããªãã¯ã¤ã«ãã§é¢ç½ãã