Skip to content

Instantly share code, notes, and snippets.

View dilverdev's full-sized avatar
:octocat:
I may be slow to respond.

dilver.dev dilverdev

:octocat:
I may be slow to respond.
View GitHub Profile
@dilverdev
dilverdev / post-receive.sh
Created May 13, 2021 14:32
Deploy bot discord
#!/bin/sh
. /root/.nvm/nvm.sh
export WEBHOOK_URL=""
nameBot="Deploy"
project=frontend-web
curl -H "Content-Type: application/json" -d '{"username": "'"$nameBot"'", "content": "Deployando '"$project"'"}' $WEBHOOK_URL
mkdir /var/www/$project/builds/"build-$(date +"%Y%m%d%M%S")"
cd /var/www/$project/builds
@dilverdev
dilverdev / wordpress-proxy-reverse.md
Last active May 11, 2021 07:07
Create proxy reverse wordpress

Config ngnix principal

server {
    server_name www.domain.com domain.com;
    charset utf-8;

    location /blog/ {
        proxy_pass https://blog.domain.com;
        proxy_redirect                      off;
<template>
<div :style="{opacity: opacity}">
<slot />
</div>
</template>
<script>
import VueGoogleMaps from "map-element.js";
export default {
mixins: [VueGoogleMaps],
props: {
@dilverdev
dilverdev / removeOverlay.js
Created May 30, 2020 22:28
Remove overlay
const removeOverlay = () => {
const overlay = document.getElementById('signwall-app')
overlay.remove()
const body = document.querySelector('body')
body.classList.remove('overflow-hidden')
body.style.overflow = 'scroll'
const html = document.querySelector('html')
html.classList.remove('overflow-hidden')
@dilverdev
dilverdev / deploy_node.sh
Last active May 13, 2021 17:08 — forked from cvega93/deploy_git.sh
Easy automatic deploy bash for dummies
#!/bin/sh
projectname=$1;
# sh deploy-node [name]
cd /var/www;
mkdir $projectname;
cd $projectname;
touch ".env";
touch ".env";
mkdir builds;
@dilverdev
dilverdev / contact-form.js
Created April 27, 2020 04:52
Events Contact Form 7
document.addEventListener('wpcf7invalid', function (event) {
console.log('wpcf7invalid')
}, false);
document.addEventListener('wpcf7spam', function (event) {
console.log('wpcf7spam')
}, false);
document.addEventListener('wpcf7mailsent', function (event) {
console.log('wpcf7mailsent')
@dilverdev
dilverdev / modal.html
Created April 27, 2020 04:44
Multiple Modal Vanilla
<div class="modal" id="modal-1">
<div class="modal-box">
<div class="modal-close">
<div class="icon-close"></div>
</div>
<div>
<!-- content -->
</div>
</div>
</div>
@dilverdev
dilverdev / share-urls.md
Created April 23, 2020 16:49 — forked from apisandipas/share-urls.md
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=

@dilverdev
dilverdev / index.js
Last active February 25, 2020 03:46
loop comment facebook mobile web
setInterval(() => {
const newNumber = Math.floor(Math.random() * 10)
document.querySelector("#composerInput").value = 'soy otro del oto boot ' + newNumber
document.querySelector("#u_0_3o > input[type=hidden]").value = 'soy otro del oto boot ' + newNumber
document.querySelector("#comment_form_100000476487163_4034457913246718 > div._7om2._2pin._2pi8._4-vo > div:nth-child(3) > button").disabled = false;
document.querySelector("#comment_form_100000476487163_4034457913246718 > div._7om2._2pin._2pi8._4-vo > div:nth-child(3) > button").click();
}, 5000);
@dilverdev
dilverdev / location.mixin.js
Last active February 17, 2020 20:01
mixin global
import Vue from 'vue'
export default {
install(Vue) {
Vue.mixin({
... metodos, computed, etc
})
}