Skip to content

Instantly share code, notes, and snippets.

View Mao8a's full-sized avatar

Mauricio Ochoa Mao8a

View GitHub Profile
@Mao8a
Mao8a / Coomon-proportions.scss
Last active August 25, 2022 17:33
SCSS: Common proportions
/*
Frequently used proportions:
Square: 1:1 -> 1 -> 100% example: 400x400px
Portrait: 4:3 -> 1.333...:1 -> 75% example: 800x600px
Divine: 5:3~ -> 1.618:1 -> 61.8% example: 1110x686px
Landscape: 16:9 -> 1.777...:1 -> 56.25% example: 1280x720px
Film A: 37:20 -> 1.85:1 -> 54.05% example: 1140x616px
Film B: 21:9 -> 2.4:1 -> 41.84% example: 1140x477px
*/
$prop-1-1: 100%;
@Mao8a
Mao8a / wp-issues-fixed.md
Last active March 4, 2016 15:57
WP:Issues-Fixed

Worpress Fixes

Fatal error: Allowed memory size of 268435456 bytes exhausted at...

Add this lines to wp-config.php before wp-settings

/** Increase memory limit */
define( 'WP_MEMORY_LIMIT', '1024M' );
define( 'WP_MAX_MEMORY_LIMIT', '1024M' );
@Mao8a
Mao8a / linuxNginxPhpPhp-fpm.conf
Created November 6, 2014 20:02
CONF: Linux, Nginx, PHP, Php-fpm
ec2 aws linux ami
cambiar valores
/etc/php-fpm.d/www.conf
/var/run/php-main.socket
/etc/nginx/nginx.conf
/etc/nginx/conf.d/new-site.conf
chown ec2-user o ubuntu
/var/lib/nginx
@Mao8a
Mao8a / new-site.conf
Created November 6, 2014 19:49
CONF: Nginx new server
server {
listen 80;
server_name dominio.com;
root /var/www/html;
#if ($http_host != "dominio.com") {
# rewrite ^ http://dominio.com$request_uri permanent;
#}
index index.php index.html;
location = /favicon.ico {
log_not_found off;
@Mao8a
Mao8a / drupal.hs
Created September 12, 2014 13:55
DRUPAL: Drush commands
drush cache-clear all
drush en module_name
@Mao8a
Mao8a / git-igonore-symfony2
Created May 29, 2014 23:54
GIT: Git-Igonore Symfony2
# -- Symfony2 -----------------------------------------
app/bootstrap.php.cache
app/bootstrap_cache.php.cache
app/config/parameters.ini
app/config/parameters.yml
app/cache/*
app/logs/*
vendor/*
web/bundles/*
web/css/*
@Mao8a
Mao8a / media-queries-based-on-bootstrap.less
Created January 8, 2014 23:13
LESS: MediaQueries based on bootstrap 3
/* media-queries.less */
/*
Deffined on variables.less from bootstrap
Large screen / wide desktop / screen >= 1200px
Medium screen / desktop / 992px >= screen < 1200px
Small screen / tablet / 768px >= screen < 992px
Extra small screen / phone / 480px >= screen < 768px
Very small screen / Outdated phone / screen < 480px
*/
/* Large screen & Biger */
@Mao8a
Mao8a / Conditional class for cross-browsing.html
Last active May 1, 2020 05:22
HTML: Conditional class for crossbrowsing
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class=""> <!--<![endif]-->
@Mao8a
Mao8a / favicon.html
Last active May 1, 2020 05:24
HTML: favicon and apple touch icons iconifier.net
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png" />
@Mao8a
Mao8a / 0_reuse_code.js
Created December 3, 2013 01:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console