Skip to content

Instantly share code, notes, and snippets.

View johackim's full-sized avatar

johackim johackim

View GitHub Profile
@johackim
johackim / firewall.php
Created December 8, 2014 10:44
firewall
<?php
/************************************************************************/
/* PHP Firewall: Universal Firewall for WebSite */
/* ============================================ */
/* Write by Cyril Levert */
/* Copyright (c) 2009-2010 */
/* http://www.php-firewall.info */
/* dev@php-maximus.org */
/* Others projects: */
/* CMS PHP Maximus ( with mysql database ) www.php-maximus.org */

Langue

Les US sont décrits en anglais. Cela permet l'utilisation de l'Ubiquituous Language depuis les US jusque dans le code, en passant par les tests.

Titre

On utilise le formalisme Behavior-Driven Development:

@johackim
johackim / install.sh
Created January 29, 2018 10:17
Kubernetes installation
#!/bin/sh
export DEBIAN_FRONTEND=noninteractive;
if [ "$(whoami)" != "root" ]; then
echo "$0: Permission denied"
exit 1;
fi
# Install kubeadm
if [ -z "$(command -v kubeadm)" ]; then
@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;
}

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:

<!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 / 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
@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 / 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 / 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']