Skip to content

Instantly share code, notes, and snippets.

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

jean-françois lefebvre jflefebvre

🏠
Working from home
View GitHub Profile
@manfromanotherland
manfromanotherland / mfp-fade.css
Created April 30, 2014 19:30
CSS: Magnific Popup fade in/out effect #snippet
.mfp-fade.mfp-bg {
opacity: 0;
background: #00;
transition: all .3s;
}
.mfp-fade.mfp-bg.mfp-ready { opacity: .9; }
.mfp-fade.mfp-bg.mfp-removing { opacity: 0; }
.mfp-fade.mfp-wrap .mfp-content {
@wpsmith
wpsmith / delete-posts.sql
Created February 12, 2014 16:47
SQL: Delete all posts of a custom post type with its associated meta data (taxonomies, post meta)
DELETE a,b,c
FROM {PREFIX}_posts a
LEFT JOIN {PREFIX}_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN {PREFIX}_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'POST_TYPE' AND a.post_date < '2014-01-01'
@phpfour
phpfour / EmailController.php
Created September 10, 2013 18:36
Debugging email sending issue with SwiftMailer in Symfony2.
<?php
namespace Rbs\Bundle\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class EmailController extends Controller
{
public function testAction()
{
@chrisjlee
chrisjlee / media-queries.scss
Last active January 6, 2024 12:36
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Facebook Puzzle: One Day Calendar</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
#calendar {
overflow: hidden;
font-family: "Lucida Sans Unicode","Lucida Grande",Garuda,sans-serif;;
@SimonSimCity
SimonSimCity / pagination.html.twig
Last active September 30, 2023 17:29
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings.
{#
Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/
Updated by: Simon Schick <simonsimcity@gmail.com>
Parameters:
* currentFilters (array) : associative array that contains the current route-arguments
* currentPage (int) : the current page you are in
* paginationPath (string) : the route name to use for links
* showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled)
* lastPage (int) : represents the total number of existing pages
@jwcobb
jwcobb / Install MAPP stack on Mavericks using MacPorts.md
Last active March 15, 2018 14:50
Install MAPP/MAMP stack on OS X Mavericks using MacPorts.

Install MAPP (MAMP) stack on Mavericks using MacPorts

I keep most of my Apache/PHP/Percona (MySQL) configuration stuff in a local Git repository so I can track changes and I symlink to those from where they should be so you will see commands such as

 sudo ln -s ~/Documents/configs/PHP/fat-tony.local/php55.ini /opt/local/etc/php55/php.ini 

If you don’t have a similar setup, just copy your configuration files to where they need to be.

I like to prepend some of the commands with time just for curiosity’s sake to see how long it takes.

@nhoizey
nhoizey / screenshots.js
Created November 12, 2012 17:07
Take screenshots at different viewport sizes using CasperJS
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Usage:
* $ casperjs screenshots.js http://example.com
*/
var casper = require("casper").create();
@lucasmezencio
lucasmezencio / gist:2788630
Created May 25, 2012 15:03
HTML5 Snippet for Sublime Text 2
<snippet>
<content><![CDATA[
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">