Skip to content

Instantly share code, notes, and snippets.

View mittsh's full-sized avatar
🇪🇪
Tallinn, Estonia

Micha Mazaheri mittsh

🇪🇪
Tallinn, Estonia
View GitHub Profile
const randomPlusRandom = () => Math.random() + Math.random()
const randomTwoTimesRandom = () => 2 * Math.random()
// call `fn()` count-times
// and return the results as an array
const getSequence = (fn, count) => {
return Array
// create an array of `count` elements
.from(Array(count).keys())
/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/
/*global define: false*/
function readFile() {
return `{{#request.name}}## {{{request.name}}}
{{/request.name}}{{#request.cURLDescription}}
/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/
/*global define: false*/
function readFile() {
return `{{#request.name}}## {{{request.name}}}
{{/request.name}}{{#request.cURLDescription}}
// importScripts("https://cdn.jsdelivr.net/npm/mustache@4.0.1/mustache.min.js");
// importScripts("https://cdn.jsdelivr.net/npm/base64-js@1.3.1/index.min.js");
importScripts(
"https://cdn.jsdelivr.net/npm/handlebars@4.7.6/dist/handlebars.min.js"
);
const outTemplate = `
[Test 2020-12-08] a mock output of {{title}} v{{version}} using Handlebars. 🍇 🍓 🥝
---
@mittsh
mittsh / README.md
Last active October 20, 2020 08:42
@mittsh
mittsh / getRequestUUIDInHeader.js
Last active September 2, 2020 12:13
Access the (constant) header from a request in Paw
// context docs: https://paw.cloud/docs/reference/ExtensionContext
// request docs: https://paw.cloud/docs/reference/Request
// http exchange docs: https://paw.cloud/docs/reference/HTTPExchange
function evaluate(context){
// get the request we're interested in
var request = context.getRequestByName('Request')
// get the last "HTTP Exchange" (request sending)
var lastExchange = request.getLastExchange()
@mittsh
mittsh / LMOpenSSLCertificateUtils.c
Last active August 19, 2020 10:04
SecureIdentity.swift
void LMOpenSSL_Init(void)
{
OpenSSL_add_all_algorithms();
OpenSSL_add_all_ciphers();
OpenSSL_add_all_digests();
ERR_load_crypto_strings();
}
void LMOpenSSL_ClearError(void)
{
@mittsh
mittsh / fake-location.js
Created July 10, 2019 12:11
Simulate a fake location in browser API
navigator.geolocation.getCurrentPosition = (fn) => {
setTimeout(() => {
fn({
coords: {
accuracy: 40,
altitude: null,
altitudeAccuracy: null,
heading: null,
latitude: 13.705848,
longitude: 100.622798,

Installing GitLab CI on Kimsufi

We've taken the approach of running GitLab Runners inside a Docker container. For more infos, see: Run GitLab Runner in a container (GitLab Docs).

Install Linux

Pick the Linux distribution:

Ubuntu Server 18.04 "Bionic Beaver" LTS

const SearchContainer = (props) => {
const {
searchText,
setSearchText,
renderTools
} = props
return (
<div className={style.input_container}>
<input
className={style.search_input}