Skip to content

Instantly share code, notes, and snippets.

View ahkohd's full-sized avatar
🔨
Building

Victor Aremu ahkohd

🔨
Building
View GitHub Profile
@ahkohd
ahkohd / zap-updates.json
Last active October 26, 2024 17:03
A JSON file that contains information about the latest Zap release
{
"version": "v0.0.39",
"notes": "refactor: set fixed tauri-cli",
"pub_date": "2024-10-26T17:03:13Z",
"platforms": {
"darwin-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUUjRYWkN6NHd6enorbWZHUHdDdEs4S1ZKMWtwY1h1TmtuaGRid2o5bnJmOHIwazU5OXlKVWk2MDl5a0FCaHZqSUF5Ni82elJvQXFDa20wREYyYk1OeWNxRTB6d1JUM2dnPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzI5OTYxOTQ0CWZpbGU6WmFwLmFwcC50YXIuZ3oKMXFRa0libkY0OGJjRXVtN29oTUNxR3ZZUTZkM0ZCK3gzSVUrc0QvR3FGY0orejBOY2c2ZlR5YW5WdDZnVkZ1WEZwWnpUbnNKbGtibnJKYUNwQW10QlE9PQo=",
"url": "https://verge.s3.us-east-2.amazonaws.com/zap-releases/x86_64-apple-darwin/0.0.39/Zap.app.tar.gz"
},
@ahkohd
ahkohd / enable-chromium-two-fingers-swipe-navigation.bash
Last active July 13, 2020 08:22
Code snippet to enable two-finger swipe gesture for next/previous page navigation for Chromium based browsers on macOS.
appName="TypeTheNameOfTheChromiumBaseBrowserInstalledOnYourMacHere"
bundleID=$(osascript -e 'id of app "'$appName'"')
defaults write $bundleID AppleEnableSwipeNavigateWithScrolls -bool TRUE
@ahkohd
ahkohd / disable-chromium-two-fingers-swipe-navigation.bash
Last active March 30, 2021 15:55
Code snippet to disable two-finger swipe gesture for next/previous page navigation for Chromium based browsers on macOS.
appName="TypeTheNameOfTheChromiumBaseBrowserInstalledOnYourMacHere"
bundleID=$(osascript -e 'id of app "'$appName'"')
defaults write $bundleID AppleEnableSwipeNavigateWithScrolls -bool FALSE
@ahkohd
ahkohd / disable-chromium-two-fingers-swipe-navigation-explained.bash
Last active August 10, 2023 07:15
Code snippet to disable two-finger swipe gesture for next/previous page navigation for Chromium based browsers on macOS.
# Set your app name - the Chromium Browser (i.e Chrome, Brave) in a variable.
appName="Brave"
# Get the bundle Id of the Chromium Browser, store it in a variable.
bundleID=$(osascript -e 'id of app "'$appName'"')
# Example: Get the bundle Id of Brave browser
# Returns:
# com.brave.Browser
import ApolloClient from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
import { concat } from 'apollo-link';
import { GRAPHQL_API_URL } from 'config/consts';
import { InMemoryCache } from 'apollo-boost';
import authMiddleware from './apollo/authMiddleware';
import errorMiddleware from './apollo/errorMiddleware';
const defaultOptions = {
watchQuery: {
@ahkohd
ahkohd / index.html
Created April 30, 2020 20:43
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<h1>Fade In/Out Window Example</h1>
@ahkohd
ahkohd / index.html
Created April 30, 2020 20:42
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<h1>Fade In/Out Window Example</h1>
//...
// If you want to stop fade-out at will.
// Just clear the fade out time interval.
window.clearInterval(fadeOutWindowIntervalRef);
// If you want to stop fade-in at will.
// Just clear the fade in time interval.
window.clearInterval(fadeInWindowIntervalRef);
const { remote } = require("electron");
// ...`fadeWindowOut` and `fadeWindowIn` functions goes here...
// Get the current window.
const currentWindow = remote.getCurrentWindow();
// Fade-out window every 2 milliseconds, step by 0.1
let fadeOutWindowIntervalRef = fadeWindowOut(currentWindow, 0.1, 2);
const fadeWindowOut = (
browserWindowToFadeOut,
step = 0.1,
fadeEveryXSeconds = 10
) => {
// Get the opacity of the window.
let opacity = browserWindowToFadeOut.getOpacity();
// Reduce the opacity of the window by `step` every `fadeEveryXSeconds`.