Skip to content

Instantly share code, notes, and snippets.

View JorgeJuarezM's full-sized avatar

Jorge Luis Juarez JorgeJuarezM

View GitHub Profile
const API_URL = 'https://api.evacenter.com/graphql/';
function getCookieValue(name) {
let matches = document.cookie.match(
new RegExp('(?:^|; )' + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + '=([^;]*)'),
);
return matches ? decodeURIComponent(matches[1]) : undefined;
}
async function fetchAPI(url, headers, body) {
const API_URL = "https://api.evacenter.com/graphql/";
function getCookieValue(name) {
let matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : undefined;
}
async function fetchAPI(url, headers, body) {
@JorgeJuarezM
JorgeJuarezM / EFS-filesystem.md
Created March 26, 2024 01:46 — forked from maxmilian/EFS-filesystem.md
unknown filesystem type 'efs'
sudo apt-get update
sudo apt-get install -y git binutils make
git clone https://github.com/aws/efs-utils
cd efs-utils
make deb
sudo apt-get install -y ./build/amazon-efs-utils*deb
@JorgeJuarezM
JorgeJuarezM / server4spa.py
Created November 3, 2023 01:00 — forked from iktakahiro/server4spa.py
Python3 http.server for Single Page Application
#!/usr/bin/env python
# Inspired by https://gist.github.com/jtangelder/e445e9a7f5e31c220be6
# Python3 http.server for Single Page Application
import urllib.parse
import http.server
import socketserver
import re
from pathlib import Path
https://linuxsuperuser.com/reinstall-grub2-efi-bootloader-ubuntu/
https://linuxsuperuser.com/how-to-restore-or-create-efi-partition-in-ubuntu/
https://linuxsuperuser.com/reinstall-grub2-efi-bootloader-ubuntu/
# Visit: https://askubuntu.com/questions/990218/camera-not-working-on-macbook-pro
# As at 8/3/2020 follow the instructions Here. They come in two parts, make sure you also follow the ones for your platform. They are a bit jumbled on the site so I have included them below.
# I'm running 18.04 LTS (Bionic) on a 2013 Macbook Pro. The instructions that worked for me were as follows:
sudo apt-get install git
sudo apt-get install curl xzcat cpio
git clone https://github.com/patjak/facetimehd-firmware.git
cd facetimehd-firmware
make
sudo make install
usermod -s /bin/bash user
CREATE EXTENSION dblink;
SELECT dblink_connect('dbname=SYS_BK user=openerp password=1234 host=192.168.50.100');
select
-- count(*), date
*
from dblink('select id, date, company_id from account_move_line')
as t1(id integer, date date, company_id integer)
@JorgeJuarezM
JorgeJuarezM / open_port_ufw.sh
Last active December 24, 2019 17:07
Abrir Puertos en Ubuntu 18.04 +
sudo ufw allow from any to any port 10000 proto tcp
@JorgeJuarezM
JorgeJuarezM / odoo-wsgi.py
Created October 10, 2019 15:03 — forked from danidee10/odoo-wsgi.py
Odoo wsgi file for running odoo10 as a wsgi application
# WSGI Handler sample configuration file.
#
# Change the appropriate settings below, in order to provide the parameters
# that would normally be passed in the command-line.
# (at least conf['addons_path'])
#
# For generic wsgi handlers a global application is defined.
# For uwsgi this should work:
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
#