Skip to content

Instantly share code, notes, and snippets.

View zazk's full-sized avatar
:octocat:
Let's talk about Javascript & DevOps

Enrique Juan de Dios zazk

:octocat:
Let's talk about Javascript & DevOps
View GitHub Profile
@zazk
zazk / sql
Created April 2, 2024 17:06 — forked from alexander-ae/sql
wordpress - replace url
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
@zazk
zazk / postgres-brew.md
Created October 26, 2022 00:56 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@zazk
zazk / DEPLOYMENT.md
Last active May 25, 2020 01:24
GitHub Actions NodejS

Deploy to Digital Ocean Droplet

This guide use https://github.com/appleboy/ssh-action to deploy this repository, you can modify the commands as you want.

In the Github Repository

  1. Create a /.github/workflows/deployment.yml
  2. Setup in Github Secrets:
  • SERVER_IP: Server IP Address
  • SERVER_USERNAME: Username
  • SERVER_PASSWORD: Password
  • PROJECT_PATH: Project path
@zazk
zazk / storytelling-resources.md
Last active April 27, 2020 19:39
Storytelling Resources

https://rockcontent.com/es/blog/que-es-storytelling/

  • Scott McCloud:
  • Understanding Comics
  • Reinventing Comics
  • Making Comics
  • The Hero's Journey (Joseph Campbell)
  • The Hero of a Thousand Faces (Joseph Campbell)
  • Save the Cat (Blake Snyder)
  • The Storytelling Animal
  • The Moth
@zazk
zazk / questionsInWP.js
Last active March 30, 2020 19:27 — forked from nelsson/questionsInWP.js
in process
$ = jQuery.noConflict();
function menuRespuesta(id){
var htmlTextArea = `<div class="c-wrap-menu b1">
<span class="c-open-menu">
<span class="fa fa-caret-down"></span>
</span>
<div class="c-menu-desplegable">
<h3 class="c-menu-title">Tipo de respuesta</h3>
<ul class="c-menu-list">
@zazk
zazk / protoc-gen-go.sh
Created March 24, 2020 18:02 — forked from f3nry/protoc-gen-go.sh
Generating proto Go code from a definition
brew install protobuf
go get -u google.golang.org/grpc
go get -u github.com/golang/protobuf/protoc-gen-go
protoc -I=./api --go_out=plugins=grpc:./api ./api/hello.proto
@zazk
zazk / README.md
Last active August 6, 2020 11:47
Mac OS Developer Setup
@zazk
zazk / Dockerfile
Created September 1, 2019 21:23 — forked from erdostom/Dockerfile
Good starter Dockerfile + docker-compose.yml for Rails 6.
FROM ruby:2.6.3-alpine
RUN apk add --update --no-cache bash build-base nodejs sqlite-dev tzdata postgresql-dev yarn
RUN gem install bundler:2
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install --check-files
func onMainDo<T>(_ firstMainBlock: @escaping () -> Void, onBackgroundDo backgroundBlock: @escaping () -> T, thenOnMainDo mainBlock: @escaping (T) -> Void) {
DispatchQueue.main.async {
firstMainBlock()
DispatchQueue.global(qos: .background).async {
let result = backgroundBlock()
DispatchQueue.main.async {
mainBlock(result)
}
}
}