Skip to content

Instantly share code, notes, and snippets.

View tricinel's full-sized avatar

Bogdan Lazar tricinel

View GitHub Profile
const loadImageMachine = Machine({
id: 'loadImage',
initial: 'idle',
states: {
idle: {
on: {
'no-store': 'GET',
'immutable': 'check-cache',
'stale-while-invalidate': 'force-update'
}
@tricinel
tricinel / createIndex.ts
Created March 30, 2021 06:42
Creating a lunr index
import lunr from 'lunr';
import { pick, propEq, map, filter, prop } from 'ramda';
interface FieldConfigAttributes {
boost: number;
}
interface FieldConfig<T> {
name: keyof T;
store: boolean;
#!/bin/bash
filename='NOTES.md'
format='
r=%(refname)
currenttag=${r#refs/tags/}
prevtag=$(git describe --always --tags --abbrev=0 ${currenttag}^)

Keybase proof

I hereby claim:

  • I am tricinel on github.
  • I am tricinel (https://keybase.io/tricinel) on keybase.
  • I have a public key ASBtonK9_KBpYQE61T1vp82tMvBe-X_0layewnUVnG6c5Qo

To claim this, I am signing this object:

@tricinel
tricinel / document.html
Last active August 29, 2015 14:18 — forked from pk/document.html
<!doctype html>
<html lang="en_GB">
<head>
<meta charset="utf-8">
<title>Content</title>
<script type="text/javascript" src="./print.js"></script>
<style>
/* Page layout, header, footer */
body {
<?php echo do_shortcode( '[contact-form-7 id="1234" title="Contact form"]' ); ?>
scp -r username@remotehost.com:wordpress /local/wordpress
mysqldump -u [username] -p [password] db_name > db_backup.sql