Posts by asfelix • 580 points
23 posts
-
1
votes1
answer28
viewsA: automatic style change
With a little more 'investigation' I was able to discover a function in the main.js file that hid the logo, just comment it to solve the problem. $(window).on('scroll', function() { var y =…
-
-1
votes1
answer28
viewsQ: automatic style change
I’m using the theme Elevate on my website and wish to make a change: Currently the logo in the upper left corner is displayed normally, but when going down the site, the style of the logo is changed…
-
0
votes1
answer239
viewsQ: Div exceeding size inside another div
I am working with Bootstrap and I am trying to make a 'table' with two columns. Inside the right column I want to place another 'table' with 4 cells, each with 100x100px images. All right so far,…
-
6
votes1
answer5766
viewsA: How to know if the script command has been successfully executed?
Use the variable $? it returns "0" if the last command was successfully executed, and returns "1" if there was an error in this command. Below is a table with these special variables that are…
-
3
votes1
answer264
viewsA: How to add value of one conditioned cell to the value of another?
Instead of specifying each kit that composes the product in column B, divide this column into 3: Kit 1, Kit 2 and Kit 3, so for example for product 1, mark an "X" in the columns corresponding to…
-
0
votes2
answers541
viewsA: Shell Script Filter and Execution
You can check the file extension based on its last characters, as in the example below where I check the last 4: #!/bin/bash echo "qual o arquivo?" read arquivo if [ ${arquivo: -4} == ".txt" ]; then…
-
4
votes5
answers40467
viewsA: How to redirect php pages
You can easily use the header syntax "Location", something like this: <?php header('Location: /paginadestino.php'); ?>
-
1
votes2
answers453
viewsA: How to compact directory except a specific folder via SSH with zip command?
You will have to run the command remotely, then: ssh [email protected] -p 2255 'zip backup.zip /public_html --exclude var' the command will ask the user password and ready, you will have your…
-
0
votes4
answers2812
viewsA: Sending email by PHP does not show accents correctly
I make use of Phpmailer and my emails are sent with the correct encoding, for this I added in my email script, in the first line I added the code below: <meta http-equiv="content-type"…
-
1
votes2
answers1390
viewsA: What is the list command for files starting with "a" and ending with "v"?
nor need to complicate so much; the old command ls can help you in this already very easily. Just make a: ls a*v But you expressed yourself badly in the question, because you are looking for a…
-
3
votes1
answer195
viewsA: Doubt xampp directory
I found the solution in Stackoverflow in English (because I use Xampp) and translate it freely: "Find the file "httpd-ssl.conf", below the comment "SSL Virtual Host Context", which is under port 443…
-
1
votes3
answers323
viewsA: Writing Div ID Makes Div Hidden Appear
First, leave the div in question with visibility: Hidden; then inside your input use the onKeyUp, sort of like this: if(this.value > 0){…
-
3
votes2
answers326
viewsA: Creating Navbar to Test Responsive Site
I was a little bit in doubt about your question, but using Bootstrap you can do what you want (I interpreted it in two possible ways), see the following examples and say if any of them help: Static…
-
3
votes2
answers235
viewsA: Why don’t all commands work with pipe?
Take this way, let’s use the Kill command as the first example: Let’s say the output of the "cat /tmp/server.pid" command is something like "3193". As you did the first time, your command with pipe…
-
3
votes2
answers857
viewsA: How to check if a website is registered?
You are referring to having the domain registered in competent bodies such as.br registration or to the site being already published? If it’s domain registration issues, the "whois" command does…
-
0
votes3
answers3910
viewsA: Select current date
If the date in your database is stored in the format "2016-03-14 09:26:18" you can search directly in Sqlserver with the command: select * from TableName where DtBase like '%2016-03-14%'; in PHP…
-
2
votes1
answer261
viewsQ: Mysql to Mariadb Migration
I have a Mysql server that has several banks; some gigantic ones. I have been studying and saw that several services have migrated from Mysql to Mariadb. As it is a Fork, I could simply migrate this…
-
5
votes3
answers17307
viewsA: PHP give refresh on a page
If I understand correctly, this is simple to do with PHP: header("Refresh: 0"); This will reload your current page, and if you need to redirect to another page, use the code below: header("Refresh:…
-
-1
votes2
answers320
viewsA: Can I update the GIT version without losing my repositories?
On my servers (Debian, Centos, Gentoo...) I always update without any problems.
-
2
votes2
answers78
viewsA: script does not write to file
I discovered my mistake, actually as I have in my user an alias for ls I ended up getting used to it, so really the error was in the line that @Cantoni quoted. To correct I did as follows:…
-
1
votes2
answers78
viewsQ: script does not write to file
I’m putting together a bash script as follows: #!/bin/bash destfile=/home/user/teste.txt array=($(ls 20151* |awk '{ print $9 }')) n=${array[@]} echo "$n" > "$destfile" but when running the script…
-
-2
votes1
answer489
viewsA: Error installing mongodb 3.0 on Ubuntu 15.10 Linux?
Install it with the command: sudo apt-get install mongodb-server After the installation is complete, try to start the server with the command: sudo mongod It will probably present the error message…
-
4
votes2
answers1414
viewsA: How to give automatic permissions in shell script
use "-p" option, this way you will be copying not only the files and folders, but also their due permissions; to better understand: $ man cp