Skip to content

Instantly share code, notes, and snippets.

😏
Studying

Amin NAIRI aminnairi

😏
Studying
Block or report user

Report or block aminnairi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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.