Skip to content

Instantly share code, notes, and snippets.

View silassare's full-sized avatar
😇
Coding the world!

Emile Silas Sare silassare

😇
Coding the world!
View GitHub Profile
@silassare
silassare / host_key_verification_failed.md
Created September 20, 2022 18:21
Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Using VS Code built in Git

When you get this error message:

Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
@silassare
silassare / fix-esm-import-paths.js
Created July 21, 2022 09:58
Browse a folder and try to change all esm import `from`, by auto prefixing `.js` or `/index.js` only if this file exists.
import * as fs from 'fs';
import * as path from 'path';
// https://gist.github.com/lovasoa/8691344
async function* walk(dir) {
for await (const d of await fs.promises.opendir(dir)) {
const entry = path.join(dir, d.name);
if (d.isDirectory()) {
yield* walk(entry);
} else if (d.isFile()) {
@silassare
silassare / appscript-v8.js
Last active August 29, 2020 22:22
This script checks for some errors in translations, and helps the translators fix that.
function onEdit (evt) {
// permet de récuperer la valeur d'une cellule
var range = evt.range;
validateRow(range.getRow(), true);
}
function translationAutoFill(csv, tab_sep="\t", line_sep="\n"){
var lines = csv.split(line_sep);
var themes_inputs = document.querySelectorAll(".input-theme-text textarea");
{
"openapi": "3.0.0",
"info": {
"title": "Learnybox API",
"version": "2.0"
},
"servers": [
{
"url": "/",
"description": ""
@silassare
silassare / OPathResolver.php
Last active October 27, 2017 13:16
A simple php class that resolve relative path to absolute path according to a given root path.
<?php
/**
* Usage:
*
* <?php
* include 'OPathResolver.php';
*
* $root = '/var/www/html/';
* $path = '../../log/';
* $abs_path = OPathResolver::resolve($root, $path);