Skip to content

Instantly share code, notes, and snippets.

View codigomaye's full-sized avatar
🏠
Working from home

David Maye codigomaye

🏠
Working from home
View GitHub Profile
@codigomaye
codigomaye / minimal-app.cpp
Created July 8, 2024 13:27
A minimal wxWidget cross-platform GUI app
// Name: minimal-app.cpp
// Purpose: Minimal wxWidgets sample
// Author: David Maye
// This library then include the library for the target under the hood
#include "wx/wx.h"
// Declare the application class
class MyApp : public wxApp
{
@codigomaye
codigomaye / minimal-app.ii
Created July 8, 2024 13:23
GCC C++ preprocessed file for a minimal wxWidget app
This file has been truncated, but you can view the full file.
# 0 "minimal-app.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "minimal-app.cpp"
@codigomaye
codigomaye / doctringTraits.php
Last active January 27, 2024 21:28
Use Traits for Doctring ORM
<?php
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
trait HasName
{
@codigomaye
codigomaye / hashnode-article-page-sidebar.css
Last active September 9, 2022 10:54
Add sidebar to article and page in Hashnode
:root {
--sidebar-length: 0.2fr;
--text-color: #0F1B27;
--links-color: white;
--sidebar-link-color: white;
--sidebar-background: #172A4A;
--footer-text-color: white;
--background-color: white;
}
@codigomaye
codigomaye / hashnode-sidebar-home.css
Last active September 9, 2022 10:53
Add a sidebar to your hashnode blog
:root {
--sidebar-length: 0.2fr;
}
/*NOTE: Sidebar will only apppear when screen device => 961*/
@media (min-width: 961px) {
.blog-body {
display: grid;
grid-template-columns: var(--sidebar-length), 1fr;
grid-template-areas:
@codigomaye
codigomaye / exportar-base-datos.sh
Created July 16, 2022 14:34
Exportar base datos de MySQL
mysqldump --routines -u root -p wordpress > base-datos.sql
/*Cuando se hace click en un enlace de navegacion, esconde la barra de navegacion movil*/
jQuery("a.nav-link").click(function(){
jQuery("button#mobile-toggle").trigger("click")
})
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://kit.fontawesome.com/ceed011d65.js" crossorigin="anonymous"></script>
<title>Document</title>