Skip to content

Instantly share code, notes, and snippets.

View fnhipster's full-sized avatar
💭
clear cache && refresh

Carlos A. Cabrera fnhipster

💭
clear cache && refresh
View GitHub Profile
@fnhipster
fnhipster / gist:5460604
Created April 25, 2013 15:27
Mobile/Desktop htaccess redirect
# MOBILE REDIRECT
RewriteCond %{REQUEST_URI} !/mobile.*$
RewriteCond %{REQUEST_URI} !/hub.*$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ /mobile [L,R=302]
# if a user is accessing a mobile page from desktop then show desktop version
RewriteCond %{HTTP_USER_AGENT} "!android|!blackberry|!iphone|!ipod|!iemobile|!opera mobile|!palmos|!webos|!googlebot-mobile" [NC]
RewriteRule ^mobile/(.*)$ / [L,R=302]
@fnhipster
fnhipster / gist:6232386
Created August 14, 2013 15:53
Responsive breakpoitns
@media only screen and (min-width: 768px) {
/* tablets and desktop */
}
@media only screen and (max-width: 767px) {
/* phones */
}
@media only screen and (max-width: 767px) and (orientation: portrait) {
/* portrait phones */
version: '3.0'
services:
db:
image: mariadb:10.2
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: magentou
@fnhipster
fnhipster / prune
Created June 30, 2020 23:24 — forked from dannygsmith/valet-plus-destroy
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@fnhipster
fnhipster / quick-view.js
Created March 24, 2025 14:22
PDP "Quick View"
/* eslint-disable import/no-cycle */
/* eslint-disable import/no-unresolved */
import {
InLineAlert,
Icon,
Button,
Image,
provider as UI,
} from '@dropins/tools/components.js';
import { events } from '@dropins/tools/event-bus.js';