Skip to content

Instantly share code, notes, and snippets.

View lmacchiavelli's full-sized avatar
🐍
This emoji is me

Lorenzo Macchiavelli lmacchiavelli

🐍
This emoji is me
View GitHub Profile
@jareware
jareware / SCSS.md
Last active July 1, 2024 09:25
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@theskumar
theskumar / image2datauri.py
Created February 17, 2013 13:29
sublimetext 2 plugin to open the image file as data uri
#encoding=utf8
import sublime, sublime_plugin
import os, base64
class Image2Base64(sublime_plugin.EventListener):
def on_load(self, view):
if view.file_name():
fileName, fileExtension = os.path.splitext(view.file_name())
if fileExtension.lower() in conv_extensions:
@lukaspawlik
lukaspawlik / ai1ec-sample-usage.php
Last active May 15, 2021 05:49
AI1EC usage sample
function ai1ec2_display_events_func( $atts ) {
global $ai1ec_registry;
$content = '<div id="content2"><img src="/wp-content/themes/scio/images/events-header.png" alt="" />';
$time = $ai1ec_registry->get( 'date.system' );
// Get localized time
$timestamp = $time->current_time();
// Set $limit to the specified categories/tags
$limit = array(
//
// this is demo data - please use your own filters
@pyguerder
pyguerder / Django-on-OVH-tutorial.md
Last active March 12, 2023 16:01
Installation de Django sur un hébergement mutualisé OVH

La méthode présentée ici permet d'installer un site Django sur un hébergement mutualisé OVH.

Lisez d'abord le fichier README puis copiez les fichiers .htaccess et django.cgi vers votre hébergement, ainsi que le code source de Django et le code source de votre site web.

@iamlucamilan
iamlucamilan / province.txt
Created October 13, 2015 12:52
Lista province italiane
Agrigento
Alessandria
Ancona
Aosta
Arezzo
Ascoli Piceno
Asti
Avellino
Bari
Barletta-Andria-Trani
@gokulkrishh
gokulkrishh / media-query.css
Last active July 16, 2024 10:52
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@navnit-viradiya
navnit-viradiya / wp-query-with-meta-query-and-taxonomy.php
Created September 27, 2018 10:23
WooCommerce search products between price range using WP_Query
<?php
$args = array(
'post_type' => 'product',
'post_status' => 'publish',
'posts_per_page' => -1,
'tax_query' => array(
'relation' => 'AND',
array (
'taxonomy' => 'product_cat',
'field' => 'slug',