Skip to content

Instantly share code, notes, and snippets.

View mouradev's full-sized avatar
🎉

Lucas Moura mouradev

🎉
View GitHub Profile
@mouradev
mouradev / build.sh
Last active October 4, 2019 12:01
Build and copy app to dist folder. the argument '-zip' can be passed to zip the build (Wordpress plugin like)
#!/bin/sh
DIST_DIR=dist
PROJECT_NAME=${PWD##*/}
# colors
lgreen="\033[1;32m"
green="\033[0;32m"
yellow="\033[1;33m"
red="\033[1;31m"
@mouradev
mouradev / install_database.sh
Last active June 10, 2019 13:22
This script can help to create a mysql database, a user and import a sql file.
#!/bin/bash
# Bash script written by Lucas Moura mouradev.com
mysql_host="localhost"
read -p "Please enter the MySQL root user: " db_user
read -p "Please enter root user MySQL password: " root_password
read -p "Do you want to create a new database? (y/n): " create_db
if [ "$create_db" != "${create_db#[Yy]}" ] ;then
@ksmithut
ksmithut / .dockerignore
Last active September 18, 2023 15:48
Node Docker Compose nodemon
node_modules
@noelboss
noelboss / git-deployment.md
Last active April 25, 2024 10:38
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@dianjuar
dianjuar / a stop job is running for session c2 of user.md
Last active May 15, 2022 12:39
Fixing "a stop job is running for session c2 of user xxx (xs / 1min 30s)"

Fix a stop job is running for session c2 of user xxx (xs / 1min 30s)

enter image description here

This advice is pointing to arch based distributions. Manjaro in special

Install watchdog

# pacman -S watchdog >

@fernandosavio
fernandosavio / pt-br.js
Created September 1, 2014 13:09
Locale pt-br of Moment.js
// moment.js locale configuration
// locale : brazilian portuguese (pt-br)
// author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 18, 2024 16:07
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName