Skip to content

Instantly share code, notes, and snippets.

View CristianLlanos's full-sized avatar
😀
What should we learn today?

Cristian Llanos CristianLlanos

😀
What should we learn today?
View GitHub Profile
function plusOne(digits: number[]): number[] {
let carry = 1;
for (let i = digits.length - 1; i >= 0; i--) {
if (carry === 0) {
return digits;
}
const sum = digits[i] + carry;
@CristianLlanos
CristianLlanos / removeElement.ts
Last active May 24, 2023 17:41
Remove Element
/*
* https://leetcode.com/problems/remove-element/description/?envType=study-plan-v2&id=top-interview-150
*/
function removeElement(nums: number[], val: number): number {
/*
I1: nums = [l(k(3)), 2, 2, 3], val = 3
I2: nums = [l(2), k(2), 2, 3], val = 3
I3: nums = [2, l(2), k(2), 3], val = 3
I4: nums = [2, 2, l(3), k(3)], val = 3
*/
<?php
return [
'*' => [
'path' => app_path('Models'),
'namespace' => 'App\Models',
'soft_deletes' => true,
],
FROM php:7.4-cli
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
RUN apt-get update
RUN apt update
RUN apt autoremove -y
@CristianLlanos
CristianLlanos / Wiremock.sh
Last active March 28, 2020 20:37
Wiremock Configuration
# Iniciar Wiremock
docker run -d --name wiremock \
-p 9031:8080 \
-v $PWD/wiremock:/home/wiremock \
-u (id -u):(id -g) \
rodolpheche/wiremock \
--record-mappings --verbose
# Create $PWD/wiremock folder and use the example structure to append mappings
# https://github.com/rodolpheche/wiremock-docker/tree/master/samples/hello/stubs
@CristianLlanos
CristianLlanos / README.md
Created October 2, 2016 00:17
Latest Git version for Ubuntu

You need to add the Git Maintainers repository in order to get the latest Git version.

Please run these commands in order:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
sudo a2endmod ssl
sudo a2endmod rewrite
sudo a2endsite my-site.conf
@CristianLlanos
CristianLlanos / Install Vim + GVim.md
Last active March 20, 2016 08:54
Install Vim + GVim

Install Vim + Gvim

$ git clone https://github.com/vim/vim.git
$ cd vim/src
$ sudo apt-get build-dep vim

# Use this command if you've compiled vim before
$ make distclean
$ make clean
@CristianLlanos
CristianLlanos / ctags.sh
Last active May 28, 2016 19:26
CTAGS for PHP
#!bin/bash
ctags -R --PHP-kinds=+cf --regex-php="/^[ \t]*trait[ \t]+([a-z0_9_]+)/\1/t,traits/i" --exclude=.git --exclude='*.log' --exclude='*.min.*'
@CristianLlanos
CristianLlanos / .vimrc
Last active January 22, 2016 22:19 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15