Skip to content

Instantly share code, notes, and snippets.


Tiago Celestino tcelestino

Block or report user

Report or block tcelestino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tcelestino /
Last active Jun 14, 2019
Essentials Docker commands -

Essentials Docker commands

List all essentials command to use Docker. Based on

Running Docker

  • docker start [container]: Start a particular container.
  • docker stop [container]: Stop a particular container.
  • docker exec -ti [container] [command]: Run a shell command inside a particular container.
  • docker run -ti — image [image] [container] [command]: Create and start a container at the same time, and then run a command inside it.
tcelestino / delete-files-netstorage.js
Created Jun 3, 2019
remove files in images directory at Akamai NetStorage
View delete-files-netstorage.js
const deleteImagesFolder = () => {
ns.dir('/cpCode/front-app-home/images', (error, res, body) => {
if (error) {
throw new Error(`Error, ${error.message}`);
if (body.stat !== undefined) {
const { file: files } = body.stat;
files.forEach(file => {
tcelestino /
Created May 20, 2019
alias to docker clean out
# docker
alias dockercleand='docker rmi $(docker images -q)' #delete all images
alias dockercleanu='docker rmi $(docker images -q -f dangling=true)' # delete all untagged images
alias dockercleans='docker rm $(docker ps -a -q)' #delete all stopped images
tcelestino / sanitize.js
Created May 14, 2019
remove accents, switch white-space from hifen and transform string in lowercase
View sanitize.js
const sanitize = str => str.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(' ', '-').toLowerCase();
tcelestino / dark-mode-css.css
Created May 3, 2019
dark mode website with CSS
View dark-mode-css.css
@media (prefers-color-scheme: dark) {
body {
background: black;
color: white;
tcelestino / file-loader-config.js
Created Apr 19, 2019
webpack file-loader settings to next.js
View file-loader-config.js
const staticPrefix = '_next/static/';
test: /\.(eot|woff2?|ttf|svg|jpe?g|png|svg|gif|ico)$/,
use: [
loader: 'file-loader',
options: {
name: IS_PROD ? '' : '[path][name].[ext]',
publicPath: nextConf.assetPrefix.length
tcelestino /
Last active Jan 17, 2019
disable autostart Checkpoint's VPN on macOS

How can I stop Checkpoint's VPN program from automatically starting on my Mac? Then how do start it manually

To stop it from starting automatically, edit /Library/LaunchAgents/com.checkpoint.eps.gui.plist and change:



tcelestino / index.html
Created Dec 3, 2018
customize checkbox
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Checkbox customizado</title>
label {
display: block;
position: relative;
tcelestino /
Last active Mar 1, 2019
how to install composer globally on macOS

Downloading directly from the composer website

Copy and paste that link – – to your browser. It’s always the latest version of Composer.

After getting it, open your terminal to test it. You need just run that command:

php ~/Downloads/composer.phar --version

I assume that you don’t want to write … every time when you need to use a composer. Let’s move it to bin directory.

tcelestino / remove-java.txt
Created Aug 30, 2018
how to uninstall jre on mac os
View remove-java.txt
Click on the Finder icon located in your dock
Click on Go in the Finder menu
Click on Utilities
Double-click on the Terminal icon
In the Terminal window Copy and Paste the commands below:
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Oracle/Java
You can’t perform that action at this time.