Skip to content

Instantly share code, notes, and snippets.

View AlexWebLab's full-sized avatar

Alex AlexWebLab

View GitHub Profile
@AlexWebLab
AlexWebLab / .gitignore
Created May 24, 2021 06:38 — forked from salcode/.gitignore
.gitignore file for a general web project - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# https://salferrarello.com/starter-gitignore-file/
# ver 20210211
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@AlexWebLab
AlexWebLab / use-auth.jsx
Created April 30, 2021 05:59 — forked from gragland/use-auth.jsx
React Hook recipe from https://usehooks.com
// Top level App component
import React from "react";
import { ProvideAuth } from "./use-auth.js";
function App(props) {
return (
<ProvideAuth>
{/*
Route components here, depending on how your app is structured.
If using Next.js this would be /pages/_app.js
@AlexWebLab
AlexWebLab / terminal-git-branch-name.md
Created April 15, 2021 07:45 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@AlexWebLab
AlexWebLab / .gitconfig
Created April 23, 2020 11:46 — forked from codexico/.gitconfig
git alias
# https://gist.github.com/codexico/2a34c0d599f3af93b46f
[color]
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
ui = auto
[color "branch"]
@AlexWebLab
AlexWebLab / SCSS.md
Last active March 12, 2020 02:02 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@AlexWebLab
AlexWebLab / async await ie11.js
Created March 10, 2020 04:02 — forked from DejanBelic/async await ie11.js
How to use async await in ie11
// Async await func
async function getTimelineData() {
var response = await fetch('/some-api-url')
return response.json()
}
async function populateTimelineInit() {
var data = await getTimelineData();
new vis.DataSet(data);
# Insomnia Configuration
## Run the test query
{
shop {
id
name
}
}
# Query Structure Examples
<div data-section-type="cart-template">
<div class="page-header">
<h1 class="majortitle">{{ 'cart.general.title' | t }}</h1>
</div>
{% if cart.items == empty %}
<div class="row-spacing align-centre">
<p>{{ 'cart.general.empty' | t }}</p>
</div>
{% else %}
<script data-cfasync="false" >
window.saso_config = {
upsell_variant_choose_option: "please select",
upsell_variant_choose_message: "Please select an option",
translate_percent_off: '% Off'
}
</script>