Skip to content

Instantly share code, notes, and snippets.

View oscarcp777's full-sized avatar

Oscar Caceres Paredes oscarcp777

View GitHub Profile
@oscarcp777
oscarcp777 / keybase.md
Last active February 28, 2020 17:30
keybase.md

Keybase proof

I hereby claim:

  • I am oscarcp777 on github.
  • I am oscarcp777 (https://keybase.io/oscarcp777) on keybase.
  • I have a public key ASAIwHfWn0MDg4TdkHmJKK9joQA8M-uXeyF-tUS8acphtgo To claim this, I am signing this object:
{
  "body": {
    "key": {
alias ga='git add'
alias gaa='git add .'
alias gbv='git branch -v'
alias gcm='git commit -m'
alias gca='git commit -a -m'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcom='git checkout master'
alias gcos='git checkout staging'
alias gcod='git checkout develop'
@oscarcp777
oscarcp777 / flat.js
Last active November 19, 2017 00:48
Write some code, that will flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4].
// version 1
const flat = (array) => {
let list=[]
array.map((item) => {
if(Array.isArray(item)){
list=[...list,...flat(item)]
}else{
list.push(item)
}
})