Skip to content

Instantly share code, notes, and snippets.


<?php

$address = 'smtp.mail.ru'; 
$port    = 25;        
$login   = 'mail';    
$pwd    = 'pass';    
@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
@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 / 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 / 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 / $_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 / AngularJS.md
Created July 30, 2019 20:59
Projects using AngularJS

Visit https://www.madewithangular.com for the latest additions!

Launched sites:

@gostrafx
gostrafx / Proxy.md
Created August 11, 2019 19:04
Proxy To Backend

Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see here.

Proxy To Backend

Using the proxying support in webpack's dev server we can highjack certain URLs and send them to a backend server. We do this by passing a file to --proxy-config

Say we have a server running on http://localhost:3000/api and we want all calls to http://localhost:4200/api to go to that server.

We create a file next to our project's package.json called proxy.conf.json with the content

@gostrafx
gostrafx / bootstrap.js
Created January 11, 2020 05:59
bootstrap laravel
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
// try {
// window.$ = window.jQuery = require('jquery');