Skip to content

Instantly share code, notes, and snippets.

View nicoxxxcox's full-sized avatar
🌀
Looping

SuperDuperGuy nicoxxxcox

🌀
Looping
View GitHub Profile
@nicoxxxcox
nicoxxxcox / redirection.php
Created March 27, 2019 13:17
Redirection without use of header('location:[url]' in PHP
?><script>window.location="?page=blog";</script><?php
@nicoxxxcox
nicoxxxcox / app.css
Created April 2, 2019 07:40
Img within alt highlight
img[alt=""],
img:not([alt]) {
border: 5px dashed #cc0000;
}
@nicoxxxcox
nicoxxxcox / app.scss
Created April 2, 2019 07:41
Bloc.Elements.Modifiers CONVENTION
/*CONVENTION*/
.ComponentName
.ComponentName.modifierName
.ComponentName-descendantName
.ComponentName-descendantName.modifierName
@nicoxxxcox
nicoxxxcox / app.css
Created April 2, 2019 07:42
<a> within links highlight
a[href=""],
a[href="#"],
a:not([href]) {
border: 5px dashed #cc0000;
}
@nicoxxxcox
nicoxxxcox / ajax.js
Created April 16, 2019 07:55
Ajax base
$.ajax({
type: 'POST',
url: './modules/smi/templates/comments-ajax.php',
data: 'nb=' + nb + '&guid_idea=' + guid_idea,
success: function (html) {
if (html != '') {
$("#ul-comments").append(html);
$("#btn-next").attr("data-id", (parseInt(nb) + slice));
} else {
@nicoxxxcox
nicoxxxcox / email.html
Last active April 18, 2019 07:25
Email - Mysterious line on Outlook 2016
<!-- Add 1 or 3 of this table below the table who display the line -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" dir="ltr">
<tr>
<td align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" dir="rtl">
<tr>
<td>&nbsp;
</td>
</tr>
</table>
@nicoxxxcox
nicoxxxcox / Autoloader.class.php
Last active April 23, 2019 09:34
Autoloader verry simple - PHP
<?php
class Autoloader
{
static function register()
{
spl_autoload_register(array(__CLASS__, 'autoload'));
}
static function autoload($class_name)
{
@nicoxxxcox
nicoxxxcox / relativeTime.class.php
Created May 6, 2019 13:00
A class that return the relative time in French
<?php
class relativeTime
{
/**
* Methode qui renvoie le temps relatif d'une date/heure à partir d'un timestamp
* @param $datetime
* @return string
*/
@nicoxxxcox
nicoxxxcox / spacer.scss
Created February 23, 2020 16:05
Spacing utility
$vals: 768px, 992px, 1200px;
$breaks: sm, md, xl;
$base-space: 0.25rem;
@for $i from 0 through 4 {
.p-#{$i} {
padding: ($i * $base-space);
}
@nicoxxxcox
nicoxxxcox / package.json
Created March 19, 2021 15:50
npm script to compile AERIAL sass compilation
{
"name": "moule2",
"version": "1.0.0",
"description": "moule asp",
"dependencies": {
"autoprefixer": "^10.2.5",
"node-sass": "^5.0.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.2.8",
"postcss-cli": "^8.3.1"