Skip to content

Instantly share code, notes, and snippets.

View farynaio's full-sized avatar
🎯
Focusing

Adam Faryna farynaio

🎯
Focusing
  • London, UK
View GitHub Profile
@rveitch
rveitch / sass-7-1-pattern.scss
Last active June 1, 2024 03:33
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@Miq3l
Miq3l / functions.php
Last active June 22, 2021 14:15 — forked from SiR-DanieL/functions.php
Adding VAT to WooCommerce
/***************************** FRONTEND ****************************************/
/**************************
Filter to add a VAT field to:
- My Account - Edit Form -- Billing fields
- Checkout - Edit Form - Billing Fields
This function is also reordering the form fields
@gearmobile
gearmobile / stylus.txt
Created June 26, 2017 19:20
To use pug and stylus on the webpack template vue-cli
To use pug and stylus on the webpack template vue-cli provides, simply run
npm i --save-dev pug pug-loader stylus stylus-loader
Then add the attributes to the .vue root tags, eg:
<template lang="pug"></template>
<style lang="stylus"></style>.
@berkedel
berkedel / flow-error-icu4c-not-loaded.md
Created April 4, 2018 14:13
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

How to solve dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

brew uninstall --ignore-dependencies node icu4c
brew install node
@bvaughn
bvaughn / index.md
Last active June 7, 2024 15:03
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.

@bradtraversy
bradtraversy / django_cheat_sheet.md
Last active May 28, 2024 11:57
Django command cheat sheet

Django 2.x Cheat Sheet

Creating a virtual environment

We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder

python -m venv ./venv
@SarasaGunawardhana
SarasaGunawardhana / install-on-all-node.sh
Last active October 25, 2020 22:21
Prerequisites for Setup Kubenetes Cluster. You should install these things on each server.
#!/bin/bash
## Generic installation on all nodes
sysctl -w net.ipv4.ip_forward=1
sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
swapoff -a
sed -i '2s/^/#/' /etc/fstab
@rangeoshun
rangeoshun / config.el
Last active June 12, 2023 15:45
Typescript with CSS in JS (styled-components, Emotion), JSX and graphql highlight and major mode for Emacs Doom with `mmm-mode` for *.tsx
;; Assign typescript-mode to .tsx files
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode))
(require 'mmm-mode)
(setq mmm-global-mode t)
(setq mmm-submode-decoration-level 0) ;; Turn off background highlight
;; Add css mode for CSS in JS blocks
(mmm-add-classes
'((mmm-styled-mode
@cmod
cmod / hugofastsearch.md
Last active June 2, 2024 10:05 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@farynaio
farynaio / gitaliases.md
Last active April 22, 2020 19:52
47 Git Aliases That Will Make You More Productive
[alias]
  # list all aliases
  la = "!git config -l | grep alias | cut -c 7-"
  # log as graph tree
  ls = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all --branches
  # formated log with stats
  ll = log --pretty=format:'* %Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --decorate --numstat --all --branches
  # log as series of patches
  fl = log -p