Skip to content

Instantly share code, notes, and snippets.

View arcanoix's full-sized avatar
:octocat:
Developer Code Now Work

Gustavo Herrera arcanoix

:octocat:
Developer Code Now Work
View GitHub Profile
@arcanoix
arcanoix / index.html
Created July 7, 2020 21:39
Responsive Dropdown Navigation Bar
<section class="navigation">
<div class="nav-container">
<div class="brand">
<a href="#!">Logo</a>
</div>
<nav>
<div class="nav-mobile"><a id="nav-toggle" href="#!"><span></span></a></div>
<ul class="nav-list">
<li>
<a href="#!">Home</a>
@arcanoix
arcanoix / create_registry_user.sh
Created May 2, 2020 23:41 — forked from ibonkonesa/create_registry_user.sh
Create docker private registry ui and repository users
#!/bin/bash
username=$1;
password=$2;
#CREATE USER IN REGISTRY
docker run --rm -it -v $(pwd):/data httpd htpasswd -Bb /data/registrypasswords $username $password
#CREATE USER IN CATALOG
docker run --rm -it -v $(pwd):/data httpd htpasswd -b /data/auth $username $password
#UPDATE REGISTRY USERS
pass=`cat registrypasswords| base64 -w 0`
sed "s/^\(\s*htpasswd\s*:\s*\).*/\1 ${pass}/" secret.yaml > deploy.yaml
@arcanoix
arcanoix / facebook-birthdays.py
Created April 19, 2020 00:21 — forked from DeepanshKhurana/facebook-birthdays.py
Python script to create a .csv from Facebook's Event Data to list Birthdays.
# Imports
import requests
import re
import pandas as pd
import numpy as np
# Initialising Variables
names = []
@arcanoix
arcanoix / GQL_example.js
Created April 18, 2020 15:06 — forked from konami12/GQL_example.js
EejemploObjectGQL.gql
// al usar Type indica que esto es un objeto
type Curso {
// al usar el signo ! indica que
// el valor es obligatrio
id: ID!
descripcion: String
// la utilizar [] indica que es una lista
// los que nos indica que puedes tener 1 o mas
// profesores
profesores: [Profesor]
@arcanoix
arcanoix / markdown-text-101.md
Created April 2, 2020 15:52 — forked from almeidx/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@arcanoix
arcanoix / ticket-php1.php
Last active March 24, 2020 17:03 — forked from evilnapsis/ticket-php1.php
Formato de ticket para impresora de ticket
<?php
include "fpdf/fpdf.php";
$pdf = new FPDF($orientation='P',$unit='mm', array(45,350));
$pdf->AddPage('P', array(80,350));
$pdf->SetFont('Arial','B',8); //Letra Arial, negrita (Bold), tam. 20
$textypos = 5;
$pdf->setY(2);
$pdf->setX(2);
$pdf->Cell(5,$textypos,"NOMBRE DE LA EMPRESA");
@arcanoix
arcanoix / postgresql_backup_docker.txt
Created March 12, 2020 21:55
Generar un backup base de datos postgresql desde docker
Generar un backup base de datos postgresql desde docker
comando:
docker exec nombre_image pg_dump -u usuariodb name_database > file.sql
ejemplo:
docker exec devilbox_pgsql_1 pg_dump -U postgres personal_db > backup2.sql
/************************************************
*
* 📩📩📩 window.postMessage() 📩📩📩
*
* The window.postMessage() method safely enables cross-origin communication
* between Window objects; e.g., between a page and a pop-up that it spawned,
* or between a page and an iframe embedded within it.
*
************************************************/
@arcanoix
arcanoix / mysql-docker.sh
Created September 8, 2019 16:27 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#