Skip to content

Instantly share code, notes, and snippets.

Avatar
🎉

Lucas Moura mouradev

🎉
View GitHub Profile
@mouradev
mouradev / build.sh
Last active Oct 4, 2019
Build and copy app to dist folder. the argument '-zip' can be passed to zip the build (Wordpress plugin like)
View build.sh
#!/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 / sql_replace.sh
Created Jun 4, 2019
This script can help you to replace a Wordpress site url in the database
View sql_replace.sh
#!/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
@mouradev
mouradev / install_database.sh
Last active Jun 10, 2019
This script can help to create a mysql database, a user and import a sql file.
View install_database.sh
#!/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
View config_padrao.cfg
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"
View treino.cfg
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
View ordena.php
<?php
$array = array(0,7,9,4,5,2,6,1,3);
$troca = true;
$tamanho = count($array);
$temp;
You can’t perform that action at this time.