Skip to content

Instantly share code, notes, and snippets.

View xola139's full-sized avatar
🙂
always learning something

Raul Corona xola139

🙂
always learning something
View GitHub Profile
#para crear una imagen ejecuntando apache
docker commit -change='CMD ["apache2ctl","-D FOREGROUND"]' -c "EXPOSE 85 idimagen apache2
#correr apache creado asignando puerto
docker run -d -p 5000:80 apache2
#definicion crear una imagina custom colocarlo en archivo Dockerfile
FROM centos
https://docs.oracle.com/cd/E17904_01/web.1111/e13702/maven_deployer.htm#DEPGD383
2. Common NamesJAVA ARRAYS PUBLIC NEW
Implement the findCommon method. When passed two arrays of names, it will return an array containing the names that appear
in either or both arrays. The returned array should have no duplicates.
For example, calling CommonNames.findCommon(new String[]{'Ava', 'Emma', 'Olivia'}, new String[]{'Olivia', 'Sophia', 'Emma'})
should return an array containing Ava, Emma, Olivia, and Sophia in any order.
import java.util.Arrays;
public class CommonNames {
mvn install:install-file -Dfile= -DpomFile=pom.xml
You can also use git reset to undo things. Then force push.
git reset 7f6d03 --hard
git push origin -f
@xola139
xola139 / gist:a4f4591eff8cde5cbd162c0bb849de3b
Created May 31, 2018 03:42
How To Create an SSL Certificate on Nginx for Ubuntu 14.04
https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-nginx-for-ubuntu-14-04
@xola139
xola139 / remove acent
Created May 29, 2018 15:11
Snippet remove acent with javascript
var regex = new RegExp("^[a-zA-Z0-9 ,-._ÑñáéíóúÁÉÍÓÚ'\"]+$");
var str = String.fromCharCode(!e.charCode ? e.which : e.charCode);
if (regex.test(str)) {
return true;
}
<!DOCTYPE html>
<html>
<body>
<p>Click the button to display the position of the element "Apple":</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
@xola139
xola139 / wHEN Invalid Host Header when ngrok
Last active March 23, 2022 09:02
wHEN Invalid Host Header when ngrok
wHEN Invalid Host Header when ngrok tries to connect to Angular app
I found this solution
https://stackoverflow.com/questions/45425721/invalid-host-header-when-ngrok-tries-to-connect-to-react-dev-server
ngrok http 8080 -host-header="localhost:8080"
66
down vote
accepted
You need to update all angular provided packages to their latest versions as follows:
npm install typescript@2.4 --save-dev
npm install @angular/common@latest @angular/compiler@latest @angular/compiler-cli@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest --save
This should do all the necessary. Plus you could also update your angular cli that ships with angular 5 as standard version as follows: