Skip to content

Instantly share code, notes, and snippets.

View ayoubjamouhi's full-sized avatar

Ayoub JAMOUHI ayoubjamouhi

View GitHub Profile

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
/* Start Ajax */
let getHttpRequest = function () {
let httpRequest = false;
httpRequest = new XMLHttpRequest();
if (!httpRequest) {
alert('Abandon :( Impossible de créer une instance XMLHTTP');
return false;
}
{
"workbench.colorTheme": "Cobalt2",
"files.autoSave": "onFocusChange",
"editor.fontSize": 17,
"explorer.openEditors.visible": 0,
"workbench.editor.enablePreview": false,
"editor.minimap.enabled": false,
"workbench.activityBar.visible": false,
"sublimeTextKeymap.promptV3Features": true,
"editor.renderIndentGuides": false,
@ayoubjamouhi
ayoubjamouhi / meta-tags.md
Created July 17, 2019 16:37 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset="UTF-8">
<meta name="keywords" content="your, tags">
<meta name="description" content="150 words">
<meta name="subject" content="your website"s subject">
<meta name="copyright" content="company name">
@ayoubjamouhi
ayoubjamouhi / meta-tags.md
Created July 17, 2019 16:45 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
:hammer_and_pick: FIX: text
:fire: NEW: text
:arrows_clockwise: IMPROVE: text
require('dotenv').config();
const gql = require('graphql-tag');
const ApolloClient = require('apollo-boost').ApolloClient;
const fetch = require('cross-fetch/polyfill').fetch;
const createHttpLink = require('apollo-link-http').createHttpLink;
const InMemoryCache = require('apollo-cache-inmemory').InMemoryCache;
const client = new ApolloClient({
link: createHttpLink({
uri: process.env.API,
fetch: fetch
@ayoubjamouhi
ayoubjamouhi / README.md
Created July 25, 2019 08:12 — forked from agustif/README.md
NextJS sitemap generator with dynamic URL

NextJS sitemap generator

Install

The current setup has been tested on Next Js 7.0.0.

You need to install Axios.

$ npm install axios
@ayoubjamouhi
ayoubjamouhi / docker
Last active February 6, 2020 17:02
docker
Get in this machine bash : docker exec -it <containerID or Name> /bin/bash
remove all containers and images at once : docker container rm $(docker container ls -aq) --force && docker rmi $(docker images -a -q)
reload nginx : docker container exec <containerID or Name> nginx -s reload
reload nginx in ubuntu : /etc/init.d/nginx reload
docker-compose exec app composer install
sudo docker container rm $(sudo docker container ls -aq) --force && sudo docker rmi $(sudo docker images -a -q)
{
"workbench.colorTheme": "Cobalt2",
"editor.fontFamily": "Victor Mono", //i.e. add "Medium"
"editor.fontLigastures": true,
//"editor.fontWeight": "600", //To make it even bolder (Though optional)
"files.autoSave": "onFocusChange",
"editor.fontSize": 18,
"editor.cursorBlinking": "expand",
"explorer.openEditors.visible": 0,
"workbench.editor.enablePreview": false,