Skip to content

Instantly share code, notes, and snippets.

View iign's full-sized avatar

Ignacio iign

View GitHub Profile
@iign
iign / wp-config.php
Created June 17, 2021 15:05 — forked from MikeNGarrett/wp-config.php
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
/* Functions */
.category-header-wrap {
background-color: transparent;
}
.category-header {
border-bottom: 1px solid #6a6a6a;
}
.category-header-title {
<?php
$context = Timber::get_context();
$post = new TimberPost();
$context['post'] = $post;
Timber::render( array( 'page.example.twig', 'page.twig' ), $context );
@iign
iign / array_chunk-example.php
Created July 19, 2017 13:08
Looping lists in chunks/batches, as mentioned here http://blog.ign.uy/2017/loop-list-in-batches-using-twig
<?php foreach (array_chunk($photoList, 2) as $photos): ?>
<div class="grid-row">
<?php foreach ($photos as $key => $photo): ?>
<div class="grid-overlay__img-container">
<div class="grid-overlay__img" data-src="<?= $photo['url_full'] ?>"></div>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
{% set items = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] %}
{% for row in items|batch(3, 'No item') %}
<div class="row">
{% for column in row %}
<div class="element col-xs-4">
{{ column }}
</div>
{% endfor %}
</div>
<div class="row">
<div class="element col-xs-4">
Stuff
</div>
<div class="element col-xs-4">
Stuff
</div>
<div class="element col-xs-4">
Stuff
</div>
2017-05-18 15:38:26 3914 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace minimac/accounts uses space ID: 1 at filepath: ./minimac/accounts.ibd. Cannot open tablespace mysql/innodb_table_stats which uses space ID: 1 at filepath: ./mysql/innodb_table_stats.ibd
2017-05-18 15:38:26 7fffa23f23c0 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: Error: could not open single-table tablespace file ./mysql/innodb_table_stats.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot

Keybase proof

I hereby claim:

  • I am iign on github.
  • I am iign (https://keybase.io/iign) on keybase.
  • I have a public key whose fingerprint is 6543 A5B1 30BC B4DA E694 23C1 840B CFB6 8C7E 9D51

To claim this, I am signing this object:

// Sketch Plugin: AEIconizer (ctrl shift i)
// Source: github.com/tadija/AEIconizer
var iTunesSizes = [NSArray arrayWithObjects: 512, nil]
var iOSSizes = [NSArray arrayWithObjects: 83.5, 76, 60, 40, 29, 20, nil]
var watchOSSizes = [NSArray arrayWithObjects: 98, 86, 27.5, 24, nil]
var otherSizes = [NSArray arrayWithObjects: 72, 57, 50, nil]
var iconSizes = [NSArray arrayWithObjects: iTunesSizes, iOSSizes, watchOSSizes, otherSizes, nil]
function onRun(context) {
@iign
iign / gulpfile.js
Last active November 14, 2016 19:11
Basic Gulpfile
var gulp = require('gulp')
var sass = require('gulp-sass')
var autoprefixer = require('gulp-autoprefixer')
var browserSync = require('browser-sync').create()
gulp.task('sass', function () {
gulp.src('sass/**/main.scss')
.pipe(sass({outputStyle: 'uncompressed'}).on('error', sass.logError))
.pipe(autoprefixer('last 3 versions', '> 1%', 'ie 8'))
.pipe(gulp.dest('./css'))