Skip to content

Instantly share code, notes, and snippets.

View popnoart's full-sized avatar

Paula I. Portilla Lejarza popnoart

View GitHub Profile
@m-faraz
m-faraz / mysql_splitdump_v2.sh
Last active January 28, 2026 15:30
Split MySQL dump SQL file into one file per table
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
####
# This version modified from https://gist.github.com/jasny/1608062
####
@howbizarre
howbizarre / BS5RespTabs.markdown
Last active February 6, 2026 21:56
A simple way to create responsive tabs with Bootstrap 5. Tabs functionality is replaced by Accordion on small screens.

Responsive Tabs with Bootstrap 5

A simple way to create responsive tabs with Bootstrap 5. Tabs functionality is replaced by Accordion on small screens.

View sample on JsFiiddle

@CurtisL
CurtisL / .htaccess
Last active June 30, 2025 18:45
Better Maintenance Mode .htaccess rules
# BEGIN MAINTENANCE MODE
# ADD your IP address to gain access. Local IPS for local testing
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.0
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,L]
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active August 11, 2025 18:58
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:
@marcosnakamine
marcosnakamine / index.php
Created April 10, 2017 18:21
PHP - Google Invisible reCAPTCHA example
<html>
<head>
<title>reCAPTCHA demo: Simple page</title>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script>
function onSubmit(token) {
document.getElementById("demo-form").submit();
}
</script>
</head>
@nmcgann
nmcgann / IMAP_access.php
Created February 15, 2017 09:09
IMAP access class to decode imap body, fetch and assemble all the parts and attachments. Used as an utility class for processing a whole mailbox.
<?php
/**
* IMAP_access. Utility class for processing a mailbox for applications that
* want to grab the body text and do something with it e.g. create a new
* todo list item. Enough clues in there that it can be expanded to do
* a lot more if required - e.g. also grab file attachments.
*
* Based on several part-working tutorials (fixed), the PHP manual examples
* and testing on real email samples from Gmail, Thunderbird and MS outlook 2010.
* (flatten_parts is the tricky bit and was from here:
@noelboss
noelboss / git-deployment.md
Last active March 7, 2026 23:09
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@b4oshany
b4oshany / subprocess.php
Created November 21, 2015 16:07
PHP subprocess
<?php
/**
* @author Ashraf M Kaabi
* @name Advance Linux Exec
*/
class Process {
/**
* Run Application in background
*
* @param unknown_type $Command
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active March 4, 2026 00:52
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@snaquaye
snaquaye / data.php
Last active June 11, 2024 22:26 — forked from jjb3rd/data.php
An updated server-side processing script for DataTables
<?php
/*
* Script: DataTables server-side script for PHP and MySQL
* Copyright: 2012 - John Becker, Beckersoft, Inc.
* Copyright: 2010 - Allan Jardine
* License: GPL v2 or BSD (3-point)
*/
namespace Common\Utilities;