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 April 2, 2024 08:06
A JSON file that contains information about the latest Zap release
{
"version": "v0.0.35",
"notes": "chore: bump version",
"pub_date": "2024-04-02T08:06:14Z",
"platforms": {
"darwin-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUUjRYWkN6NHd6ejRMTjk1YU1VK3hOcStLc0htOGdmOWJDclhUTzRLaVF4ZGhpL0t2UVhZakRnVG16QlZ3U0dUa2wvbDhzZFI0dG9vN25JTnVKNHF1QWFTWTllRmp0RkE0PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzEyMDQ0ODMzCWZpbGU6WmFwLmFwcC50YXIuZ3oKS0hiVWprYUxLcHVzTjZ2ZXp3a1BXQXFkdTYrbWxpV253VTBBQ0NXdnR4STZMUk5wUjdPcW9ZbldmdklMYURWeGxQeXpTaUtWa0RQTmJmVzJ6RTc4QkE9PQo=",
"url": "https://verge.s3.us-east-2.amazonaws.com/zap-releases/x86_64-apple-darwin/0.0.35/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`.