Skip to content

Instantly share code, notes, and snippets.

View thisaurel's full-sized avatar
🏠
Working from home

Aurélien Riche thisaurel

🏠
Working from home
View GitHub Profile
Set is a new data object introduced in ES6. Because Set only lets you store unique values.
When you pass in an array, it will remove any duplicate values.
const myArray = [0, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7];
const removeDuplicatesFromArray = Array.from(new Set(myArray));
console.log(removeDuplicatesFromArray);
Result: (8) [0,1,2,3,4,5,6,7]
import { Injectable } from '@angular/core';
import { environment } from '../../../environments/environment';
export interface ILoggerService {
info(value: any, ...rest: any[]): void;
log(value: any, ...rest: any[]): void;
warn(value: any, ...rest: any[]): void;
error(value: any, ...rest: any[]): void;
}
Install aws cli
https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
Create IAM user with "AmazonS3FullAccess" policy and programming access ; then get the two keys (access and secret)
Configure aws cli with this command `aws configure`. Set the access, secret key and region and let output format empty
Command:
```bash
aws s3 mv s3://bucketfrom s3://bucketto --recursive --exclude "*" --include "*helloworld*" --include "*hello*" --include "*.png"
```
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/smooth/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
*~
.DS_Store
# IDE #
#############
.idea/
# Logs and databases #
######################
*.log
[user]
name = ************************
email = *************************
signingkey = *********************
[color]
ui = true
diff = auto
status = auto
[alias]
st = status -sb