Skip to content

Instantly share code, notes, and snippets.

View anzart's full-sized avatar

ANZART anzart

View GitHub Profile
@anzart
anzart / officeCustomProperties.md
Created October 10, 2022 16:50 — forked from MarcinusX/officeCustomProperties.md
Explanation on sharing custom properties between Office 2013 and Office Online

Office VSTO + jsAPI custom properties manual

Explanation

So far in VSTO we were saving properties separately in every Worksheet. JavaScript API for Office doesn't have such function (as of 13/07/2018). Instead we can save those properties in Workbook's documentProperties which are accessable both in VSTO and JS.

Note: CP means CustomProperties (too long to write every time)

JS (actually TS):

Loading

There is a bug with loading CP, so in order to load them we have to ensure that the list is not empty:

@anzart
anzart / next_nginx.md
Created October 16, 2020 13:32 — forked from kocisov/next_nginx.md
How to setup next.js app on nginx with letsencrypt

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@anzart
anzart / .eslintignore
Created October 5, 2020 18:41 — forked from heyitsarpit/.eslintignore
ESlint and Prettier for React apps (Bonus - Next.js and TypeScript)
node_modules
@anzart
anzart / memento.md
Created August 31, 2020 18:42 — forked from freuds/memento.md
Commandes de Docker

Commandes de Docker

Commandes de bases

run

La commande run permet d'instancier un container à partir d'une image. Executer une instruction dans un container :

docker run ubuntu:14.04 echo "hello world"

Affiche : hello world

@anzart
anzart / Tiny JavaScript tokenizer.js
Created June 24, 2020 10:01 — forked from borgar/Tiny JavaScript tokenizer.js
A compact tokenizer written in JavaScript.
/*
* Tiny tokenizer
*
* - Accepts a subject string and an object of regular expressions for parsing
* - Returns an array of token objects
*
* tokenize('this is text.', { word:/\w+/, whitespace:/\s+/, punctuation:/[^\w\s]/ }, 'invalid');
* result => [{ token="this", type="word" },{ token=" ", type="whitespace" }, Object { token="is", type="word" }, ... ]
*
*/
@anzart
anzart / understanding-word-vectors.ipynb
Created April 19, 2020 12:02 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anzart
anzart / introrx.md
Created March 31, 2020 21:06 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

Algorithmic layouts

You are looking at the most important, and most abundant thing on the web. You can't see it, unfortunately, because it's very small… aaaaand it's invisible — so having a magnifying glass doesn't really help here. But still.

I'm talking, of course, about U+0020; not to be confused with the band U2, who are just as ubiquitous, but far less useful.

This unicode point, representing the humble space character, is between every word, in every run of text, on every page of the web. And it has a very special characteristic: it's not sticky like glue. If two words are neighbors but there's not enough room for both of them, the space will free the second word to wrap around and start a new line.

Before getting into flexible containers, viewport meta tags, and @media breakpoints this humble character is what makes the web fundamentally 'responsive'. That is: able to change the layout of its content to suit different devices, contexts, and settings. Browser text does this automa

@anzart
anzart / react-lifecycle-cheatsheet.md
Created November 15, 2018 20:36 — forked from bvaughn/react-lifecycle-cheatsheet.md
React lifecycle cheatsheet

React lifecycle cheatsheet

Method Side effects1 State updates2 Example uses
Mounting
componentWillMount Constructor equivalent for createClass
render Create and return element(s)
componentDidMount DOM manipulations, network requests, etc.
Updating
componentWillReceiveProps Update state based on changed props