Skip to content

Instantly share code, notes, and snippets.

@jmas
jmas / stem.md
Last active March 20, 2024 09:36
Stemming
@jmas
jmas / uniqid.js
Last active March 20, 2024 07:21
uniqid.js
/**
* If IDs are generated more than 1 millisecond apart, they are 100% unique.
* @url https://stackoverflow.com/a/44078785
* @returns String
*/
function uniqid() {
return Date.now().toString(36) + Math.random().toString(36).substring(2);
}
@jmas
jmas / meta-tags.md
Created January 25, 2022 11:05 — 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">
import { ApolloServer, gql } from "apollo-server-micro";
import { makeExecutableSchema } from "graphql-tools";
import { User } from "../../utils/db";
const typeDefs = gql`
type User {
id: ID!
name: String!
email: String!
}
@jmas
jmas / draft.ts
Last active October 13, 2020 10:11
Draft of foocart
// Usage
const cart = new Cart({
priceTemplate: '{price} UAH',
completeOrder(order) {
return Promise.resolve({ success: true });
},
fetchTranslation(translation) {
return Promise.resolve({});
},
<button type="button" id="share">Share</button>
<canvas id="myCanvas"></canvas>
<script>
var canvas = document.getElementById('myCanvas'),
ctx = canvas.getContext('2d'),
image = new Image();
var file;
<button>
Click
</button>
@jmas
jmas / gist:d385ab9bdc05f8639a2a83a5193ebd25
Created April 27, 2020 11:25 — forked from sshay77/gist:4b1f6616a7afabc1ce2a
google-search-url-parameters-query-string-
// ==UserScript==
// @name Google Search Better Privacy
// @description Delete unnecessary params and add useful params on Google Search.
// @version 0.0.4
// @include http://*.google.*/search*
// @include http://*.google.*/imgres*
// @include https://*.google.*/search*
// @include https://*.google.*/imgres*
// @exclude http://play.google.com/*
// @exclude http://mail.google.com/*
<div class="section">
<div class="container" style="--background-color: {{ background_color }}">
<div class="slider" data-controller="slider">
{{# slides_list }}
{{ name_text }}
{{/ slides_list }}
</div>
</div>
</div>