Skip to content

Instantly share code, notes, and snippets.

View rbndelrio's full-sized avatar

Ruben Del Rio rbndelrio

  • Springer-Nature / Scientific American
  • New York, New York
  • 04:08 (UTC -04:00)
View GitHub Profile
@rbndelrio
rbndelrio / uploads.conf
Created November 13, 2018 16:33
nginx redirect for wp uploads (good for local dev)
location ~* \.(js|css|png|jpe?g|gif|ico)$ {
expires 24h;
log_not_found off;
try_files $uri $uri/ @production;
}
location @production {
resolver 8.8.8.8;
proxy_pass https://www.prodsite.com/$uri;
}
@rbndelrio
rbndelrio / hacks.css
Last active October 1, 2018 21:14
FIWI Invite CSS
@font-face {
font-family: Champion;
src: local("Champion-HTF-Featherweight"), url(data:font/truetype;charset=utf-8;base64,AAEAAAASAQAABAAgRkZUTVpdfUUAALe0AAAAHEdERUYAJwDRAAC30AAAAB5HUE9T6Ob2WgAAt/AAAAJoR1NVQmyRdI8AALpYAAAAIE9TLzIUjPZHAAABqAAAAGBjbWFwEKmD3QAABTQAAAJCY3Z0IDKR/+IAABWgAAAAgGZwZ209HI58AAAHeAAADW1nYXNwAAAAEAAAt6wAAAAIZ2x5Zrcs7HoAABe4AACbMGhlYWT8uxXIAAABLAAAADZoaGVhB6IDPgAAAWQAAAAkaG10eAgHDNQAAAIIAAADKmxvY2HiXRQuAAAWIAAAAZhtYXhwBv4fgQAAAYgAAAAgbmFtZXFPzdgAALLoAAADDHBvc3QpairWAAC19AAAAbhwcmVwLdIi2wAAFOgAAAC1AAEAAAABAABy6+t2Xw889QAPA+gAAAAAwlyrHgAAAADXjicl/7n+rgP0A/IAAAAIAAIAAAAAAAAAAQAAA/L+rgAABAv/uf+6A/QAAQAAAAAAAAAAAAAAAAAAAMoAAQAAAMsGKgBEAAAAAAACAUQBVgCLAAAEHxf/AAAAAAACAQoB9AAFAAACigKKAAAAlgKKAooAAAH0ADIA4QAAAAAAAAAAAAAAAIAAAC9QAAAIAAAAAAAAAAAAAAAAAAAAIPsCA/L+rgApA/IBUiAAAREAAAAAAk4DIAAAACAAAgH0AAAAAAAAAU0AAACCAAAAtwAeAToAFQJJABsBQAAFAtYAFwIJAAoApwAVAPcAFwD3AAEBqgAKAXMAGwCnABUA5QAbAKcAGwFzABkBVAAXARoACgFMAA4BQQARAVIADQFKABcBSgAXAS8AGgFKABcBSgAXAKcAGwCnABUBUgAPAUsAGwFSAA8BRQASAy8AHgE/AAQBSA
@rbndelrio
rbndelrio / openv.js
Last active April 5, 2018 15:12
1Password thing
#!/usr/bin/env node
const fs = require('fs');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const readFile = util.promisify(fs.readFile);
const writeFile = util.promisify(fs.writeFile);
const args = process.argv.slice(2);
@rbndelrio
rbndelrio / Dockerfile
Created September 1, 2017 20:36
Nginx + PHP-FPM + WordPress + Bedrock + Docker
FROM richarvey/nginx-php-fpm
MAINTAINER name@example.com
EXPOSE 80 443
ADD . /var/www/html/
@rbndelrio
rbndelrio / index.template.html
Last active May 12, 2017 13:53
Actually modern document head
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<link rel="canonical" href="https://redacted.com/">
<title>Redacted</title>
<meta name="description" content="Lorem Ipsum aslkdfj laskdjf lsakdfjlsa dfjldsk">
import lz from 'lz-string'
function Lstorage() {
if (!(this instanceof Lstorage)) {
return new Lstorage();
}
Lstorage.a = {}
Lstorage.len = 0
return this
@rbndelrio
rbndelrio / mixins.scss
Last active September 7, 2016 15:42
High-dpi images
@mixin hidpi {
@media only screen and (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
@content;
}
}
@mixin image2x($name, $extension: 'jpg', $size: auto, $position: null, $repeat: null) {
@if $size != auto {
background-size: $size;
}
@mixin break-max($size) {
@media only screen and (max-width: $size) { @content; }
}
@mixin break-min($size) {
@media only screen and (min-width: $size + 1) { @content; }
}
//Example
@rbndelrio
rbndelrio / snip.html
Created January 19, 2016 16:59
Vertical aligning with Flexbox + IE9 table fallback
<div class="va">
<div class="va__body">
<div class="va__content">
<h1>Hello, World!</h1>
</div>
</div>
</div>
BEGIN:VCARD
VERSION:2.1
N:Del Rio;Ruben;;;
FN:Ruben Del Rio
TITLE:Designer
TEL;CELL:+1-[redacted]
EMAIL;PREF:ruben@rdelrio.com
EMAIL;HOME:[redacted]
GENDER:M
ADR;HOME:;;;Orlando;Florida;;United States