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;
}
@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
https://stackoverflow.com/a/163659
how to merge : https://stackabuse.com/git-merge-branch-into-master/
{
"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,
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Alt>Shift_L']"