Skip to content

Instantly share code, notes, and snippets.

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

Andrea Musso amusso01

🏠
Working from home
  • London
View GitHub Profile
@amusso01
amusso01 / css
Last active December 9, 2024 21:42
Finshark Utility Classes
// A complete set of CSS classes for margin and padding, including all directions
// right(r), left(l), top(t), bottom(b), x-axis(x), and y-axis(y).
// From 0 to 100 px step 10 px
/* Margin Classes */
.mx_0 { margin-left: 0; margin-right: 0; }
.mx_10 { margin-left: 10px; margin-right: 10px; }
.mx_20 { margin-left: 20px; margin-right: 20px; }
.mx_30 { margin-left: 30px; margin-right: 30px; }
.mx_40 { margin-left: 40px; margin-right: 40px; }
@amusso01
amusso01 / wp-query-ref.php
Created August 27, 2019 16:06 — forked from luetkemj/wp-query-ref.php
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@amusso01
amusso01 / function.php
Created March 11, 2019 12:46
Wordpress extras for function.php
// remove guttenberg css
function remove_gutenberg_styles() {
wp_dequeue_style( 'wp-block-library' );
}
add_action( 'wp_enqueue_scripts', 'remove_gutenberg_styles', 100 );
/**
* Disable the emoji's
@amusso01
amusso01 / _spacing-helpers.scss
Created September 9, 2018 19:52 — forked from jacurtis/_spacing-helpers.scss
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@amusso01
amusso01 / gulpfile.js
Created February 14, 2018 15:46
a basic gulpfile with built in task to quick start my project
'use strict';
//dependency
var gulp = require('gulp');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-clean-css');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var changed = require('gulp-changed');
@amusso01
amusso01 / border box-sizing CSS
Created March 2, 2017 23:00
Universal Box Sizing with Inheritance best practice
//declare this after the reset rules in css
html {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*, *:before, *:after {
@amusso01
amusso01 / dirLink.php
Last active January 29, 2017 23:41
read the files in the a dir and return an array of those with an extension
@amusso01
amusso01 / createTable.php
Created January 29, 2017 23:02
Create a table out of a CSV file
function tablePopulate($csvFilename){
$tableArray=intranetFile($csvFilename);//open the file and return array of it
echo '<table>'.PHP_EOL;
foreach ($tableArray as $key => $value) {
$tempData= explode(',', $tableArray[$key]);
echo "<tr>";
foreach ($tempData as $dataKey => $dataValue) {
if ($key==0) {
echo "<th scope='col'>$dataValue</th>".PHP_EOL;
}else {
@amusso01
amusso01 / navigation.php
Created January 29, 2017 22:53
PHP create a nav ot of array
//function to create a navigation bar out of an Array
//select an ID for the <nav> default is "headerNav"
function makeNav($linkArray,$ID='headerNav'){
$output=' <nav id='.$ID.'>'.PHP_EOL.' <ul>'.PHP_EOL;
foreach ($linkArray as $navElement => $link) {
$output.=" <li><a href='$link'>$navElement</a></li>".PHP_EOL;
}
$output.=' </ul>'.PHP_EOL.' </nav>'.PHP_EOL;
echo $output;
}