Skip to content

Instantly share code, notes, and snippets.

Avatar
😏
Studying

Amin NAIRI aminnairi

😏
Studying
View GitHub Profile
@aminnairi
aminnairi / docker-compose.yaml
Last active May 26, 2020
Docker Compose settings for Elastic Search + Kibana
View docker-compose.yaml
version: "3"
# docker-compose up --detach
# docker-compose down --remove-orphans --volumes --timeout 0
services:
elasticsearch:
restart: always
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0
environment:
- "discovery.type=single-node"
@aminnairi
aminnairi / capitalize.js
Created Jun 9, 2019
Capitalize files in a directory recursively
View capitalize.js
const { readdirSync, statSync, renameSync } = require('fs');
function capitalize(input) {
return input.slice(0, 1).toUpperCase() + input.slice(1);
}
function recursivelyCapitalizeFilesAndDirectories(path) {
for (const file of readdirSync(path)) {
const capitalizedFile = capitalize(file);
@aminnairi
aminnairi / MaterializeSelect.js
Last active Jan 2, 2019
Vue.js wrapper for the MaterializeCSS's select component
View MaterializeSelect.js
'use strict';
// https://codesandbox.io/s/v37l3k0k53
const Vue = require('vue') // npm install vue
const M = require('materialize-css') // npm install materialize-css@^1.*
Vue.component('MaterializeSelect', {
template: `
<select :value='value'>
@aminnairi
aminnairi / index.php
Last active Jan 8, 2017
Démonstration image de captcha avec boutton de rechargement en JQuery
View index.php
<!-- type de document -->
<!doctype html>
<!-- dialecte -->
<html lang='fr-FR'>
<head>
<!-- encodage -->
<meta charset='utf8'>
<title>Captcha avec bouton de rechargement</title>
</head>
<body>
You can’t perform that action at this time.