Skip to content

Instantly share code, notes, and snippets.

View SauelAlmonte's full-sized avatar

Salmonte SauelAlmonte

View GitHub Profile
@SauelAlmonte
SauelAlmonte / Restaurant bill + tip = x
Created January 13, 2023 18:35
Restaurant bill + tip = x
// Bill Values 275, 40 , 430
const bill = 430;
const tip = (bill >= 50 && bill <= 300 ? 15 : 20);
console.log(`The bill was $${bill}, the tip was $${bill * tip / 100}, the total bill is $${bill + (bill * tip) / 100}`)
## WORDPRESS
DB_NAME='msimbo_org'
DB_USER='root'
DB_PASSWORD='root'
# Optional variables
DB_HOST='mysql'
# DB_PREFIX='wp_'
WP_ENV='development'
<html><body>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
<div x-data="{ items: [], adding: false }" x-init="$refs.ok.disabled = true">
<template x-for="item in items" :key="item">
<div>
<span x-text="item"></span>
<button @click="items = items.filter(i => i !== item)">DEL</button>
</div>
@SauelAlmonte
SauelAlmonte / osx-10.11-setup.md
Created January 26, 2021 00:34 — forked from kevinpapst/osx-10.11-setup.md
Mac OS X 10.11 El Capitan Setup

Developer setup for Mac OS X 10.11 El Capitan

Inspired by a Gist from kevinelliott - thanks!

Software

Install from App Store

  • Xcode - for command line tools required by Homebrew
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
{
"dependencies": {
"autoprefixer": "^10.1.0",
"postcss": "^8.2.1",
"tailwindcss": "^2.0.2"
},
"scripts": {
"dev" : "live-server .",
"tw": "tailwindcss build ./src/tailwind.css -o ./dist/tailwind.css"