Skip to content

Instantly share code, notes, and snippets.

View cipas's full-sized avatar

Goiceanu Ciprian cipas

View GitHub Profile
@cipas
cipas / git branch from a feature branch.txt
Last active February 10, 2023 07:44
git Tips: working with a feature branch from another feature branch
Start your branch_b from branch_a, i.e.:
git checkout branch_a
git checkout -b branch_b
Whenever branch_a changes while it is waiting to get merged into master, you rebase branch_b on it:
After branch_a has been merged into master, you simply get the new master and rebase branch_b onto it:
git checkout master
@cipas
cipas / React Native-[README]-template.md
Last active January 12, 2023 07:38
Basic React Native readme structure template
@cipas
cipas / .bash_profile
Created August 9, 2022 10:04
Git helpers
alias status="git status"
alias co="git checkout"
alias fetch="git fetch"
alias save="git save"
alias pull="git pull"
alias push="git push"
alias cm="git add . && git commit -am "
alias stash="git stash"
alias pop="git stash pop"
alias check="git check"
@cipas
cipas / .gitconfig
Created August 9, 2022 07:53
Git usefull aliases
[alias]
check = remote show origin
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
save = !git add -A && git commit -m 'SAVEPOINT'
undo = reset HEAD~1 --mixed
done = push origin
co = checkout
cob = checkout -b
cm = commit -am
cm4 = "!f() { git commit -am \"$(git branch-name) $1\"; }; f"

update object

var state = {
    id: 1,
    points: 100,
    name: "Goran"
};

var newState = {
const array = [2, 9, 1, 3]
const sortedArray = array
.concat()
.sort((x, y) => Math.sign(x - y));
@cipas
cipas / clean_code.md
Created September 8, 2019 11:19 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@cipas
cipas / nativescript-vs-ionic-vs-reactnative.md
Last active April 17, 2017 19:59
NativeScript vs Ionic Framework vs React Native

NativeScript vs Ionic Framework vs React Native

Pros & Cons

  • Ionic CLI is a delight to work with, there are some aspects of the CLI such as text coloring, file template generators that are better than NativeScrtip’s CLI.
  • It’s easier to get started with Ionic if you are coming from a web-development background, as NativeScript uses XML for it’s UI it will be easier for native Android developers to get started with it as XML is used to create UI in Android.
  • Both have support for Angular 2, but you can use NativeScript without Angular using plain TypeScript.
  • The debugging experience of Ionic is easy and quick than in NativeScript.
  • For Ionic, if you wish to use native device features such as camera, file storage, etc you will have to rely on third-party plugins. For NativeScript, you do have plugins that are created by the NativeScript community but you can use native device features if you want right out of the box.
  • Ionic has a reach ecosystem of servies and products that you can choose which w
@cipas
cipas / mysql.txt
Created January 20, 2016 06:50 — forked from johnantoni/mysql.txt
mysql + vagrant + remote access
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf
@cipas
cipas / mixin.round-line-border.scss
Created November 10, 2015 05:50
Sass mixin - round line border
@mixin circle($width, $border-width, $color) {
width: $width;
height: $width;
border: $border-width solid $color;
-webkit-border-radius: $width/2;
-moz-border-radius: $width/2;
border-radius: $width/2;
}