Skip to content

Instantly share code, notes, and snippets.

View frizadiga's full-sized avatar

friz() frizadiga

View GitHub Profile
@frizadiga
frizadiga / test.md
Created May 25, 2023 15:12 — forked from ityonemo/test.md
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@frizadiga
frizadiga / enzyme_render_diffs.md
Created January 7, 2019 03:23 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render

Sublime linter setup

Displays warnings and errors from ESLint. You need eslint installed. See readme of https://github.com/roadhump/SublimeLinter-eslint for eslint installation instructions

  1. With Package Manager, install SublimeLinter and SublimeLinter-contrib-eslint
  2. Cmd+Shift+P should now have a SublimeLinter: Lint This View option
  3. Running that should lint your file. It should also run the linter on file load and save (configurable on SublimeLinter settings)

Sublime formatter setup

Autoformats your files according to ESLint --fix option

@frizadiga
frizadiga / readme.md
Created August 1, 2018 14:17 — forked from beckybeauchamp1/readme.md
Git Rebase Illustrations

Git Pull

Git Pull/Merge

Git Rebase

Git Rebase

@frizadiga
frizadiga / nginx.conf
Created June 1, 2018 15:55 — forked from mjurincic/nginx.conf
Setup NodeJS Production with PM2, Nginx on AWS Ubuntu 16.04 server
proxy_http_version 1.1;
proxy_set_header Connection "";
https://gist.github.com/miguelmota/6912559
# The upstream module is the link between Node.js and Nginx.
# Upstream is used for proxying requests to other servers.
# All requests for / get distributed between any of the servers listed.
upstream helloworld {
# Set up multiple Node.js webservers for load balancing.
# max_fails refers to number of failed attempts
# before server is considered inactive.
@frizadiga
frizadiga / README.md
Created December 26, 2017 16:23 — forked from chrisjacob/README.md
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result