Skip to content

Instantly share code, notes, and snippets.

Avatar
💯

johackim johackim

💯
View GitHub Profile
View rss.xml
<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Johackim]]></title><description><![CDATA[Hacker indépendant]]></description><link>https://johackim.com/</link><image><url>https://johackim.com/favicon.png</url><title>Johackim</title><link>https://johackim.com/</link></image><generator>Ghost 3.40</generator><lastBuildDate>Thu, 15 Apr 2021 11:59:03 GMT</lastBuildDate><atom:link href="https://johackim.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Générer des idées de produits - Techniques actionnables pour trouver de nouvelles idées de business]]></title><description><![CDATA[Apprenez à trouver des idées pour votre prochaine entreprise, votre activité secondaire ou votre startup indépendante.]]></description><link>https://johackim.com/livres/generating-product-
@johackim
johackim / generate-mdx-node-id.js
Last active Apr 14, 2021
Generate mdx node id from file path
View generate-mdx-node-id.js
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);
View S3ObjectTrait.diff
--- lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -87,11 +87,12 @@
$count += $read;
});
- $uploader = new MultipartUploader($this->getConnection(), $countStream, [
- 'bucket' => $this->bucket,
- 'key' => $urn,
- 'part_size' => $this->uploadPartSize,
@johackim
johackim / config.ini
Last active Dec 19, 2020
Writefreely default config
View config.ini
[server]
port = 8080
bind = 0.0.0.0
[database]
type = mysql
username = writefreely
password = myp@ssw0rd
database = writefreely
host = mariadb
View index.html
<!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>
@johackim
johackim / remove.sh
Last active Jun 13, 2020
Remove traefik certificate on consul
View remove.sh
#!/bin/sh
DOMAIN=$1
if [[ -z "$1" ]]; then
echo "usage: remove.sh [domain]"
exit 1
fi
consul kv get traefik/acme/account/object | gzip -dc > acme.json
View chrome
#!/bin/bash
/opt/google/chrome/chrome.orig --no-sandbox --ignore-certificate-errors $@
View traefik-ssl.yml
version: "3.7"
services:
consul:
image: consul:1.7.1
command: agent -server -bootstrap-expect=1
environment:
- CONSUL_BIND_INTERFACE=eth0
- CONSUL_CLIENT_INTERFACE=eth0
volumes:
View keybase.md

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:

View nginx-onlyoffice.conf
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}