Skip to content

Instantly share code, notes, and snippets.

View allanminium's full-sized avatar

allanminium

View GitHub Profile
<!DOCTYPE html>
<html lang="en" ng-app="taskManager">
<head>
<meta charset="UTF-8">
<title>Task Manager</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
.task-done { text-decoration: line-through; color: gray; }
.list-container { margin-bottom: 20px; }
<!DOCTYPE html>
<html ng-app="taskManagerApp">
<head>
<title>Task Manager</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
h1 { color: #333; }
ul { list-style-type: none; padding: 0; }
/**
* Equalize JS
* Source: https://css-tricks.com/snippets/jquery/equalize-heights-of-divs/
*/
jQuery.fn.equalize = function() {
var maxHeight = 0;
return this.each(function() {
var $this = jQuery(this);
@allanminium
allanminium / hide price and add to cart.php
Created July 16, 2021 05:47
PHP Snippet: Hide Add to Cart Buttons and Prices if Logged Out @ WooCommerce Shop & Single Product Page
/**
* @snippet Hide Price & Add to Cart for Logged Out Users
* @how-to Get CustomizeWoo.com FREE
* @author Rodolfo Melogli, BusinessBloomer.com
* @testedwith WooCommerce 4.6
* @donate $9 https://businessbloomer.com/bloomer-armada/
*/
// SOURCE: https://www.businessbloomer.com/woocommerce-hide-price-add-cart-logged-users/
add_action( 'init', 'bbloomer_hide_price_add_cart_not_logged_in' );
@allanminium
allanminium / readcookie.js
Created March 22, 2019 03:37
Read a cookie in Javascript #javascript
// https://stackoverflow.com/questions/5639346/what-is-the-shortest-function-for-reading-a-cookie-by-name-in-javascript
function readCookie(k){return(document.cookie.match('(^|; )'+k+'=([^;]*)')||0)[2]}
@allanminium
allanminium / verticalalign.css
Created March 1, 2019 00:06
[Vertical Align Image or Text] Vertical align images or text in CSS #css
.container {
position: relative;
}
.container .element {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
@allanminium
allanminium / gist:894cfd685f38118625cac7d8120dc905
Created February 25, 2019 05:43
Check on Memory/CPU Usage and processes
See the script names next to the PID
ps -eo pid,ppid,start_time,command
Source: https://serverfault.com/a/518756
See memory and CPU % usages and PID
top
@allanminium
allanminium / gist:d19fab38b8cb233a622cf50ce4587efd
Last active February 24, 2019 23:39
Find and delete all files of a given extension #bash
find . -name "*.bak" -type f -delete