Skip to content

Instantly share code, notes, and snippets.

View colormono's full-sized avatar
🤓
I’m learning as I go

Mariano Rivas colormono

🤓
I’m learning as I go
View GitHub Profile
@colormono
colormono / NPM.sh
Last active May 27, 2020 15:09
[NPM] #CLI
# Create user
npm adduser
# Login
npm login
# Current user
npm whoiam
# Package version
@colormono
colormono / README.md
Last active May 28, 2020 21:57
Multiple git accounts, same computer #setup #CLI

Follow below steps to add multiple accounts. More info at: https://gist.github.com/jexchan/2351996

Step 1:

goto .ssh folder and generate ssh keys for all your github accounts

$ cd ~/.ssh

$ ssh-keygen -t rsa -b 4096 -C "personal_email_id"

@colormono
colormono / COLORMONO.json
Created May 19, 2020 15:27
iTerm2 Profile #setup
{
"Use Non-ASCII Font" : false,
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.3333333432674408,
"Blue Component" : 1,
"Red Component" : 0.3333333432674408
},
@colormono
colormono / settings.json
Created April 22, 2020 18:07
[VSCode] settings #setup
{
"editor.formatOnSave": true,
"prettier.printWidth": 120,
"git.enableSmartCommit": true,
"files.associations": {
"*.overrides": "less",
"*.variables": "less",
},
"git.confirmSync": false,
"workbench.iconTheme": "vscode-icons",
@colormono
colormono / osx.sh
Created April 8, 2019 14:25
[OSx] #CLI
# hidden files
defaults write com.apple.Finder AppleShowAllFiles true
killall Finder
# bulk images covert
sips -Z 640 *.jpg
@colormono
colormono / regex.js
Last active April 8, 2019 14:24
[Regex] #JS
// https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285
// Trim spaces
^[\s]*(.*?)[\s]*$
// HTML Tag
<([a-z]+)([^<]+)*(?:>(.*)<\/\1>|\s+\/>)
// Anchors — ^ and $
^The matches any string that starts with The -> Try it!
@colormono
colormono / docker.sh
Last active May 14, 2021 21:29
[Docker] #CLI
# create and start containers
docker-compose up
# start services with detached mode
docker-compose -d up
# start specific service
docker-compose up <service-name>
# list images
@colormono
colormono / zsh.sh
Last active March 20, 2019 13:12
[ZSH] #CLI
# edit user profile
code ~/.zshrc
# user profile path
wich zsh
# change shell
chsh -s /usr/bin/zsh
tail /etc/passwd
@colormono
colormono / git.sh
Last active March 29, 2019 17:33
[GIT] Basic Git commands #CLI
# Clone a repository
git clone [email protected]:github-org/github-ce.git
git clone https://github.com/github-org/github-ce.git
# Clone a repository with another profile
git clone [email protected]:github-org/github-ce.git
# Basic Git commands
git checkout <branch_name>
@colormono
colormono / get-spotify-token.js
Created December 4, 2018 14:17
Get Spotify API Token with Javascript
import axios from 'axios';
import qs from 'qs';
// your application requests authorization
var CLIENT_ID = 'your-app-id';
var CLIENT_SECRET = 'your-app-secret';
var accessToken = '';
axios({
method: 'post',