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
@mouradev
mouradev / sql_replace.sh
Created June 4, 2019 18:41
This script can help you to replace a Wordpress site url in the database
#!/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 "Please enter the database name: " db_name
read -p "Please enter the database prefix (blank to no prefix): " db_prefix
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "use weapon_knife; use weapon_hegrenade"
bind "5" "slot5"
bind "6" "use weapon_knife; use weapon_decoy"
bind "7" "slot7"
bind "8" "slot8"
exec gamemode_competitive
bot_kick
mp_warmup_end
mp_roundtime 60
mp_roundtime_defuse 60
mp_freezetime 0
mp_maxmoney 60000
mp_startmoney 60000
mp_buytime 10000
mp_buy_anywhere 1
<?php
$array = array(0,7,9,4,5,2,6,1,3);
$troca = true;
$tamanho = count($array);
$temp;