<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by syobochim on Medium]]></title>
        <description><![CDATA[Stories by syobochim on Medium]]></description>
        <link>https://medium.com/@syobochim?source=rss-a2e87c2df673------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*72lA216s8Cu8vcLUtUw08Q.png</url>
            <title>Stories by syobochim on Medium</title>
            <link>https://medium.com/@syobochim?source=rss-a2e87c2df673------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:55:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@syobochim/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[Electron] Keep apps on top, whether in full-screen mode or on other desktops.]]></title>
            <link>https://syobochim.medium.com/electron-keep-apps-on-top-whether-in-full-screen-mode-or-on-other-desktops-d7d914579fce?source=rss-a2e87c2df673------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7d914579fce</guid>
            <category><![CDATA[electron]]></category>
            <category><![CDATA[desktop-app]]></category>
            <dc:creator><![CDATA[syobochim]]></dc:creator>
            <pubDate>Mon, 16 Nov 2020 13:43:23 GMT</pubDate>
            <atom:updated>2020-11-16T13:43:23.342Z</atom:updated>
            <content:encoded><![CDATA[<p>I made an application with Electron.</p><p>The app is</p><ul><li>visible when switching workspaces (Desktop)</li><li>appear on top of other apps</li><li>appears on top when other apps are displayed in full screen</li><li>appears on top when Keynote in Presentation Mode</li></ul><p>In particular, it is difficult to appear on top when Keynote in the Presentation mode. This is the final solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*orWcNqZIZHlV6YmBIHmnvQ.gif" /></figure><p>I added the setting when I opened the windows in main.js that is defined in main of package.json .</p><pre>const { app, BrowserWindow } = require(&quot;electron&quot;);<br>const is_mac = process.platform===&#39;darwin&#39;</pre><pre>if(is_mac) {<br>  app.dock.hide()                                     // - 1 - <br>}</pre><pre>const MAIN_WINDOWS_WIDTH = 300;<br>const MAIN_WINDOWS_HEIGHT = 350;<br>function createClapWindow() {<br>  // Create the browser window.<br>  const mainWindow = new BrowserWindow({<br>    width: MAIN_WINDOWS_WIDTH,<br>    height: MAIN_WINDOWS_HEIGHT,<br>    webPreferences: {<br>      preload: path.join(__dirname, &#39;preload.js&#39;),<br>    }<br>  })<br>  mainWindow.setAlwaysOnTop(true, &quot;screen-saver&quot;)     // - 2 -<br>  mainWindow.setVisibleOnAllWorkspaces(true)          // - 3 -<br>  mainWindow.loadFile(&#39;public/reaction.html&#39;)<br>}</pre><pre>app.whenReady().then(() =&gt; {<br>  createClapWindow()<br>})</pre><ol><li>app.dock.hide()</li></ol><p>This setting allows macOS to display on top of full-screen mode. Since Windows OS does not have this setting, so I check that it is macOS before it. The setting is applied only for macOS.</p><p>2. mainWindow.setAlwaysOnTop(true, &quot;screen-saver&quot;)</p><p>This setting allows displaying on top when Keynote in Presentation Mode. There is an itemalwaysOnTop in BrowserWindow. When I set thistrue , other apps were applied on top, but keynote presentation mode was not. So I need to set this setting mainWindow.setAlwaysOnTop(true, &quot;screen-saver&quot;) .</p><p>3. mainWindow.setVisibleOnAllWorkspaces(true)</p><p>This setting allows displaying when I move other workspaces.</p><h3>Reference Links</h3><ul><li><a href="https://www.electronjs.org/docs/api/browser-window">https://www.electronjs.org/docs/api/browser-window</a></li><li><a href="https://www.electronjs.org/docs/api/dock">https://www.electronjs.org/docs/api/dock</a></li><li><a href="https://discuss.atom.io/t/set-browserwindow-always-on-top-even-other-app-is-in-fullscreen/34215/2">https://discuss.atom.io/t/set-browserwindow-always-on-top-even-other-app-is-in-fullscreen/34215/2</a></li><li><a href="https://stackoverflow.com/questions/48367441/make-electron-window-able-to-receive-click-event-when-above-keynote-app">https://stackoverflow.com/questions/48367441/make-electron-window-able-to-receive-click-event-when-above-keynote-app</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7d914579fce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[​[Electron] Make the app background transparent, ​and don’t let the user click the mouse.]]></title>
            <link>https://syobochim.medium.com/electron-make-the-app-background-transparent-and-dont-let-the-user-click-the-mouse-dad3cd9b6bbd?source=rss-a2e87c2df673------2</link>
            <guid isPermaLink="false">https://medium.com/p/dad3cd9b6bbd</guid>
            <category><![CDATA[electron]]></category>
            <category><![CDATA[desktop-app]]></category>
            <dc:creator><![CDATA[syobochim]]></dc:creator>
            <pubDate>Mon, 09 Nov 2020 12:51:49 GMT</pubDate>
            <atom:updated>2020-11-09T12:51:49.495Z</atom:updated>
            <content:encoded><![CDATA[<p>​I made a desktop app with Electron.</p><ul><li>I want the background to be transparent.</li><li>I want to erase the frame.</li><li>I don’t want user to change the size.</li><li>Do not shadow windows (When I made the background transparent, something like a shadow of letters appeared.)</li><li>Don’t want the mouse to click (prevent someone from making a choice)</li><li>I don’t want you to open developer mode.</li></ul><p>​I didn’t have a lot of things organized on the Internet, so just for reference.</p><p>​I added the settings when I opened the window in main.js, which is defined in main of package.json .</p><pre>const { BrowserWindow } = require(&quot;electron&quot;)</pre><pre>function createClapWindow() {<br>  const mainWindow = new BrowserWindow({<br>    transparent: true,<br>    frame: false,<br>    resizable: false,<br>    hasShadow: false,<br>    webPreferences: {<br>      devTools: false<br>    }<br>  })<br>  mainWindow.setIgnoreMouseEvents(true)<br>  mainWindow.loadFile(&#39;public/index.html&#39;)<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dad3cd9b6bbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Created an app to liven up online events.]]></title>
            <link>https://syobochim.medium.com/created-an-app-to-liven-up-online-events-e8dd87e28aee?source=rss-a2e87c2df673------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8dd87e28aee</guid>
            <category><![CDATA[online-marketing]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[presentations]]></category>
            <category><![CDATA[electron]]></category>
            <dc:creator><![CDATA[syobochim]]></dc:creator>
            <pubDate>Sat, 31 Oct 2020 16:51:04 GMT</pubDate>
            <atom:updated>2020-11-01T01:17:25.896Z</atom:updated>
            <content:encoded><![CDATA[<h3>Released an app to liven up online events.</h3><p>I created an app to get excited at online events and presentations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*j8ypR5Dh78w48cyx" /></figure><p>With this application, pictograms are displayed on the desktop screen of the computer like this, and when the participants react, the numbers are counted up in real time, and the excitement of the participants is visualized.</p><p>By using the same eventName, you can see other presenters’ numbers and compete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JMjgKmOXnsrrFBQ7" /></figure><h3>Get Start</h3><ol><li>Download the application for your platform from the Release page, and Install it.</li></ol><p>Release Page : <a href="https://github.com/syobochim/ClapHandApp/releases">https://github.com/syobochim/ClapHandApp/releases</a></p><p>2. Press “Create Event” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*voB9Om7lXYKqEwOj" /></figure><p>3. Set properties.</p><ul><li>Event Name (required)</li><li>Owner (Required)</li><li>Emoji (option)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8PGFeKt6QQITaYZ5" /></figure><p>4. Share event participant URL and QR code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qnPYv5c64nsQCyFM" /></figure><p>5. Let’s Clap!</p><p>Open URL and, Press the emoji on the event page!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AFhChtZrh1YK7Etx" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8dd87e28aee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a bot to detect additional tasks from Asana’s Webhook]]></title>
            <link>https://syobochim.medium.com/create-a-bot-to-detect-additional-tasks-from-asanas-webhook-b57c1f008edd?source=rss-a2e87c2df673------2</link>
            <guid isPermaLink="false">https://medium.com/p/b57c1f008edd</guid>
            <category><![CDATA[asana]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[webhooks]]></category>
            <dc:creator><![CDATA[syobochim]]></dc:creator>
            <pubDate>Sat, 31 Oct 2020 16:42:09 GMT</pubDate>
            <atom:updated>2020-10-31T16:42:09.222Z</atom:updated>
            <content:encoded><![CDATA[<p>I created a bot to notify slack when I add a task in the task management service’s <a href="https://asana.com/ja">Asana</a>.<br>Usually, there are many apps that can be integrated with Asana as shown in the image below, so there is almost no need to write code from 1. However, there is a limit to the apps that can be added by the company Asana and the company Slack, so I decided to write code this time.</p><p>When I tried to use Webhook, I wanted to guarantee the security, but I didn’t have any information about it, so I hope that I can be of some help to those who make applications with Asana Webhook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q-8NrJRWKooLwumc.png" /></figure><h3>Creating ‘Personal Access Token’ for Authentication</h3><h4>First, create a Personal Access Token for authentication.</h4><p>First, you access Asana’s Developer App Console.<br>You can access this URL “<a href="https://app.asana.com/0/developer-console">https://app.asana.com/0/developer-console</a>&quot;, and<br>you can also click “My Profile Settings” from the profile image on the upper right of the screen where you logged in with Asana, and from the pop-up “Apps” tab, click “Manage Developer Apps”.</p><p>You can obtain a token in the following format by clicking “+ New Access Token” and entering the token name:. This token is used for program and curl access.</p><pre>1/1234567890123456:bive3xuos5Ohcavei4yie7ha0Oovaph8</pre><h4>Second, Register a Webhook</h4><p>To register a Webhook, you need the Project ID where the Task will be registered and the URL to send the information when the event occurs.<br>You can check the ID of Project from the URL of Asana. The number in the URL when you check the list or board of the project to register the task indicates the Project ID.<br>In the example below, 1234567890123456 is the Project ID.<br><a href="https://app.asana.com/0/1234567890123456/board">https://app.asana.com/0/1234567890123456/board</a></p><p>Run the curl command, substituting {access-token} for the Access Token, {project-id} for the Project ID, and {target-url} for the URL to which the Webhook event should be sent.</p><p>action: added detects additional events for the task. In addition to added, changed removed deleted undeleted may be used.</p><pre>$ curl -X POST <a href="https://app.asana.com/api/1.0/webhooks">https://app.asana.com/api/1.0/webhooks</a> \<br> -H ‘Content-Type: application/json’ \<br> -H ‘Accept: application/json’ \<br> -H ‘Authorization: Bearer {access-token}’ \<br> -d ‘{<br> “data”: {<br> “filters”: [<br> {<br> “action”: “added”,<br> “resource_type”: “task”<br> }<br> ],<br> “resource”: “{project-id}”,<br> “target”: “<a href="https://{target-url/">https://{target-url</a>}”<br> }<br>}’</pre><h4>Third, Handshake</h4><p>When the first Webhook event occurs, a request containing X-Hook-Secret in the HTTP header for Handshake is sent to the URL set to target-url .The registration is completed by returning a 200 OK or 204 No Content response to this request.</p><p>Here is the AWS Lambda code in Node.js at initial registration:. The second line logs the HTTP header X-Hook-Secret. <strong>MEMO this </strong>X-Hook-Secret <strong>value for later use. </strong>Also, this code is only used once when you register for the first time.</p><pre>exports.handler = async (event) =&gt; {<br> console.log(‘this is secret header — — -&gt;’ + event.headers[‘X-Hook-Secret’])<br> const response = {<br> statusCode: 200,<br> headers: {“X-Hook-Secret”: event.headers[‘X-Hook-Secret’]},<br> body: JSON.stringify(‘Hello from Lambda!’),<br> };<br> return response;<br>};</pre><p>X-Hook-Secret is a string of the form “a0ge6aChaiPhee7ioph7cucongaht3”.</p><p>You can also use this site to easily verify that this code is working properly. <br><a href="https://asana-webhook-tool.herokuapp.com/">https://asana-webhook-tool.herokuapp.com/</a></p><h4>Finally, verify the requests received by Webhook</h4><p>Next, the Webhook receives the data that was actually sent.<br>By using the X-Hook-Secret you just got, you can verify that the request sent to the target url came from Asana and safely process the request.</p><p>Below is the AWS Lambda code using Node.js. Replace {X-Hook-Secret} with the value you just got.<br>Asana sends you a request with a X-Hook-Signature header. The value of X-Hook-Signature is the body of the request hashed with SHA 256 HMAC using X-Hook-Secret.<br>Check if the hashed value and X-Hook-Signature are the same, and if they are, treat them as normal requests.</p><pre>var crypto = require(“crypto”);<br>exports.handler = async (event) =&gt; {<br> const signature = event.headers[‘X-Hook-Signature’];<br> const hash = crypto.createHmac(‘sha256’, ‘{X-Hook-Secret}’)<br> .update(String(event.body))<br> .digest(‘hex’);</pre><pre>// Check header secret<br> if (signature != hash) {<br> console.error(‘Calculated digest does not match digest from API. This event is not trusted. : ‘ + signature);<br> return response = {<br> statusCode: 401<br> };<br> }</pre><pre>// TODO : Write code to handle Webhook data</pre><pre>const response = {<br> statusCode: 200<br> };<br> return response;<br>};</pre><p>This completes the basic Webhook configuration.<br>After checking the header, you can safely manipulate the Webhook request by processing the body of the HTTP request.</p><h3>Reference Links</h3><ul><li>Access Token : <a href="https://developers.asana.com/docs/authentication-quick-start">https://developers.asana.com/docs/authentication-quick-start</a></li><li>Webhook : <a href="https://developers.asana.com/docs/get-multiple-webhooks">https://developers.asana.com/docs/get-multiple-webhooks</a></li><li>Node.js crypto : <a href="https://nodejs.org/api/crypto.html:title">https://nodejs.org/api/crypto.html</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b57c1f008edd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>