Skip to content

Instantly share code, notes, and snippets.

View johackim's full-sized avatar

johackim johackim

View GitHub Profile
@johackim
johackim / electron.md
Last active June 19, 2023 13:27
Add chrome extension on Electron

With electron-chrome-extensions

const { app, BrowserWindow, session } = require('electron');
const { ElectronChromeExtensions } = require('electron-chrome-extensions');

app.on('ready', async () => {
    await session.defaultSession.loadExtension(`${process.cwd()}/extensions/ublock/`);
    await session.defaultSession.loadExtension(`${process.cwd()}/extensions/minimal/`);
#!/bin/bash
export DISPLAY=:0
export XAUTHORITY=/home/johackim/.Xauthority
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
export APPNAME=obsidian
export WIDTH=$(xdpyinfo | grep dimensions: | awk '{print $2}' | cut -d 'x' -f1)
export HEIGHT=$(xdpyinfo | grep dimensions: | awk '{print $2}' | cut -d 'x' -f2)
for ID in $(xdotool search --name $APPNAME); do
@johackim
johackim / suspended.html
Created October 20, 2021 00:34
suspended.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Ethibox - Application suspendu</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-gray-800 text-white min-h-screen flex justify-center items-center">
<main>
@johackim
johackim / prometheus.yml
Created September 7, 2021 13:34
prometheus.yml
global:
scrape_interval: 30s
evaluation_interval: 30s
scrape_configs:
- job_name: prometheus
metrics_path: /prometheus/metrics
static_configs:
- targets: ['localhost:9090']
@johackim
johackim / waiting.html
Created August 28, 2021 13:05
waiting.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Ethibox - Installation en cours...</title>
<link href="https://unpkg.com/tailwindcss@2.2.8/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-gray-900 text-white min-h-screen flex justify-center items-center text-center">
<main>
@johackim
johackim / generate-mdx-node-id.js
Last active April 14, 2021 10:40
Generate mdx node id from file path
const uuid = require("uuid");
const generateNodeId = (filePath) => {
const seedConstant = '638f7a53-c567-4eca-8fc1-b23efb1cfb2b';
const gatsbySourceFilesystemNsHash = uuid.v5('gatsby-source-filesystem', seedConstant);
const gatsbySourceFilesystemNodeId = uuid.v5(filePath, gatsbySourceFilesystemNsHash);
const gatsbyPluginMdxNodeId = `${gatsbySourceFilesystemNodeId} >>> Mdx`;
const gatsbyPluginMdxNsHash = uuid.v5('gatsby-plugin-mdx', seedConstant);
@johackim
johackim / config.ini
Last active December 19, 2020 13:41
Writefreely default config
[server]
port = 8080
bind = 0.0.0.0
[database]
type = mysql
username = writefreely
password = myp@ssw0rd
database = writefreely
host = mariadb
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Ethibox - Configuration en cours...</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-gray-800 text-white min-h-screen flex justify-center items-center">
<main>

Keybase proof

I hereby claim:

  • I am johackim on github.
  • I am johackim (https://keybase.io/johackim) on keybase.
  • I have a public key ASDSkU2rkJKtRtocyzKoW0IX7pL8R4cMG1znxim0Z7dWhQo

To claim this, I am signing this object:

@johackim
johackim / mediaqueries.css
Created February 20, 2018 14:07
Mediaqueries
/* Mobile */
@media only screen and (max-width: 767px) {
[class*="mobile hidden"],
[class*="tablet only"]:not(.mobile),
[class*="computer only"]:not(.mobile),
[class*="large screen only"]:not(.mobile),
[class*="widescreen only"]:not(.mobile),
[class*="or lower hidden"] {
display: none !important;
}