Skip to content

Instantly share code, notes, and snippets.

View oo1john's full-sized avatar
🚀
Lost in Design

John oo1john

🚀
Lost in Design
View GitHub Profile
@oo1john
oo1john / rebase.md
Created October 31, 2022 08:30 — forked from alekpopovic/rebase.md
Ultimate rebase-onto-master guide

Rebase "web-123-my-branch" onto master:

if you're the only person who is working on a branch...

$ git checkout web-123-my-branch # make sure you're on the right branch
$ git fetch # update remote refs
$ git rebase origin/master # perform the rebase onto the current state of master
  # for each conflict, edit file, resolve conflicts, git add -u <file>, git rebase --continue
$ git push -f origin web-123-my-branch # overwrite remote branch with newly rebase branch
git rebase -i origin/master
# his one implements the behavior of git checkout when running it only against a branch name. So you can use it to switch between branches or commits.
git switch develop
# While with git checkout you can switch to a commit and transition into a detached HEAD state, by default git switch does not allow that. You need to provide the -d flag:
git switch -d f8c540805b7e16753c65619ca3d7514178353f39
# You can do the same with the new one, but the flag is -c:
const PI = 3.14;
let name = "John";
let age = 40;
let experience = BigInt(20);
let expert = true;
// -------------- definim functiile -------------
const blockFct = function() {
console.log("block function");
}
const arrowFct = () => console.log('arrow function');
const expressionFct = function() {
console.log("expression function");
}
// --------------------- if -------------------
let year = 2022; // change value with 20223
if (year == 2022) {
console.log("Yeep 2022");
} else {
console.log("2023");
}
// --------------------- case -------------------
let k = 'js';
const salariuBrut = 1000;
const cas = salariuBrut * 0.25; // Asigurari Sociale
const cass = salariuBrut * 0.10; // Asigurari Sociale de Sanatate
const impozitVenit = salariuBrut * 0.10; // Impozit pe venit
const cam = salariuBrut * 0.0225; // Agajator Contributie Asiguratorie pentru Munca
const taxe = cas + cass + impozitVenit;
const salariuTotal = salariuBrut + cam;
// src/components/effects/use-fetch.effect.js
import { useState, useEffect } from 'react';
const useFetch = (url) => {
const [data, setData] = useState(null);
useEffect(() => {
const fetchData = async () => {
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
}
env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install mysqlclient
netstat -plntu