Skip to content

Instantly share code, notes, and snippets.

View gostrafx's full-sized avatar

GOSTRA FX gostrafx

View GitHub Profile
@gostrafx
gostrafx / $_jQuery.js
Created May 25, 2019 03:13
selected Elements js
let $ = (classNameOrId)=>{
let selectedElements = querySelectorAll(classNameOrId);
let elements = (selectedElements.length === 1) ? selectedElements[0] : selectedElements;
return elements;
}
$(".classOr#id").onclick = (event)=>{
this.innerHTML = `Hello`;
}
@gostrafx
gostrafx / html.js
Created May 23, 2019 01:00
Shorthand for creating Elements
/**
* Shorthand for creating Elements.
* @param {*} tag The tag name of the element.
* @param {*} [props] Optional props.
* @param {*} children Child elements or strings
*/
function h(tag, props, ...children) {
let element = document.createElement(tag);
if (props) {
if (props.nodeType || typeof props !== "object") {
@gostrafx
gostrafx / mysqlRecovery.md
Last active October 23, 2019 21:41
MySQL (InnoDB) Database Recovery

MySQL (InnoDB) Database Recovery

Some quick facts about this writeup to save your time (in case you have a different scenario!):

  • From MySql 5.5.5 to MySql 5.6
  • Only .frm and .idb files
@gostrafx
gostrafx / Develstudio_exemod.md
Last active May 19, 2019 22:51
Develstudio Exemod

Puvre le fichier exe pour l' édition

exemod_start ( string $filename ) 

Ajoute une ressource à partir d' un fichier

exemod_addfile ( string $resname, string $filename ) 
@gostrafx
gostrafx / Develstudio_function.md
Last active May 19, 2019 22:55
Develstudio Function php
//keyboard
$_key
HotKey::
VK_
//keyboard end
______phpfunction1
__copyright
__get_handle
__message

<?php

$address = 'smtp.mail.ru'; 
$port    = 25;        
$login   = 'mail';    
$pwd    = 'pass';    
@gostrafx
gostrafx / npm.md
Created May 19, 2019 22:37
npm cli

Package management

Command Description
npm i Alias for npm install
npm install Install everything in package.json
--- ---
npm install lodash Install a package
npm install --save-dev lodash Install as devDependency
@gostrafx
gostrafx / domain.md
Last active May 19, 2019 22:37
#domain, #pays, #code, #iso, #alpha2, #alpha3, #counter
Domaine Pays
.ac Îles Ascension
.as Samoa Américaine
.at Autriche
.be Belgique
.ch Suisse
.co.il Israël
.co.uk UK
.dk
@gostrafx
gostrafx / Partage Share links.md
Created May 19, 2019 22:32
Partage Share links