Skip to content

Instantly share code, notes, and snippets.

View ulises-jeremias's full-sized avatar
:octocat:

Ulises Jeremias ulises-jeremias

:octocat:
View GitHub Profile
CREATE DATABASE IF NOT EXISTS wordpress;
USE wordpress;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'example' WITH GRANT OPTION;
FLUSH PRIVILEGES;
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://wordpress:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
version: '3'
services:
nginx:
image: nginx:alpine3.18-slim
depends_on:
- wordpress
ports:
- "80:80"
volumes:
@ulises-jeremias
ulises-jeremias / WormsWMD-Archlinux.md
Created January 21, 2023 00:59 — forked from sxiii/WormsWMD-Archlinux.md
How to fix Worms W.M.D. launch on ArchLinux, Manjaro, Garuda, Artix Linux & Linux Mint

Game information Worms W.M.D.

Distribution name and version where applicable Manjaro 20.1.1 (Mikah)

Problem description Worms doesn't launch out of the box without two small tweaks. When launching Worms W.M.D. in Manjaro and Archlinux, you need to do two things:

  1. Install this apps: sudo pacman -S libcurl-gnutls libidn11 qt5-base qt5-xcb-private-headers(If you are on any other distro then Arch, you can skip this step. At least this is reported to be OK to skip for Linux Mint)
@ulises-jeremias
ulises-jeremias / ci.yml
Created May 23, 2022 04:36 — forked from mhart/ci.yml
GitHub Actions running 5 tslint jobs in parallel (each tests every 5th file)
name: CI
on: [push]
jobs:
tslint:
runs-on: ubuntu-latest
strategy:
matrix:
job: [0, 1, 2, 3, 4]
@ulises-jeremias
ulises-jeremias / AppRoutes.jsx
Last active June 22, 2020 03:54
Props and PrivateRoute implementation using react-document-title, auth-hook ~> https://gist.github.com/ulises-jeremias/a27b85e3eea083278188f24de955989b
import React from 'react';
import { Switch, Redirect } from 'react-router-dom';
import { PropsRoute as Route } from './PropsRoute';
import { PrivateRoute } from './PrivateRoute';
import { Landing, PrivatePage } from '...';
const AppRoutes = (props) => (
<Switch>
{/* pages */}
<Route exact path="/" component={Landing} {...props} />
@ulises-jeremias
ulises-jeremias / date.js
Created June 22, 2020 03:42
Date utils using lodash
import _ from 'lodash';
export const dateFormat = (date) => {
const dateStr = String(date || '');
if (!dateStr) {
return dateStr;
}
return String(dateStr.slice(0, 10) || '')
@ulises-jeremias
ulises-jeremias / date.js
Created June 22, 2020 03:42
Date utils using lodash
import _ from 'lodash';
export const dateFormat = (date) => {
const dateStr = String(date || '');
if (!dateStr) {
return dateStr;
}
return String(dateStr.slice(0, 10) || '')
@ulises-jeremias
ulises-jeremias / auth-hook.js
Last active January 3, 2024 06:39
Examples of hooks utils using axios, recoil.js, keycloak-js, @react-keycloak/web and more.
import { useCallback, useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { useKeycloak } from '@react-keycloak/web';
import { commonNotification } from './common';
/**
* Returns the auth info and some auth strategies.
*
*/