Skip to content

Instantly share code, notes, and snippets.

View auginator's full-sized avatar

Agustin Sevilla auginator

View GitHub Profile
@auginator
auginator / machine.js
Last active June 24, 2022 01:37
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: "robotStateTransitions",
initial: "auto",
context: {
lastControlledState: "AUTO",
},
actions: {
robotModeAutonomous: assign({
lastControlledState: (context ) => "auto" }),
robotModeManual: assign({
@auginator
auginator / responsive-oembed.php
Last active November 9, 2017 16:48
Wordpress OEmbed for Responsive Video
<?php
/**
* Hook into the oembed to add the correct aspect ratio to your videos added
* with wordpress' oembed feature (i.e. by pasting a URL in the editor)
*/
// TODO: Maybe it should only do this for video sites, and leave everything else alone?
function auginator_oembed_html($html, $url, $attr, $post_id) {
// Parse width and height from the html returned from the oembed call
@auginator
auginator / gulpfile.js
Created June 21, 2017 05:13
Simple PostCSS Gulpfile with Autoprefixer
var app = {
paths: {
sass: ['path/to/sass/**/*.scss'],
css: ['path/to/css']
}
};
var gulp = require("gulp"),
gutil = require("gulp-util"),
sass = require("gulp-sass"),