Skip to content

Instantly share code, notes, and snippets.

Coby Tamayo acobster

Block or report user

Report or block acobster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@acobster
acobster / page-content-layouts.php
Created Apr 24, 2019
ACF Content Sections demo code
View page-content-layouts.php
<?php
/**
* Author: Coby Tamayo
*/
use MyProject\Post\Page;
$page = new Page();
// Get common/site-wide data
@acobster
acobster / functions.php
Created Mar 28, 2019
Custom ACF select validation
View functions.php
<?php
/*
* Disallow certain choices based on post_type and/or page template
*/
add_filter('acf/prepare_field/key=field_5c6c913e0ea64', function(array $field) {
//unset($field['choices']['full-width-image-carousel']);
//unset($field['choices']['full-width-image']);
return $field;
View .bashrc
# evil cowsay cd
cd_() { if [ "$((1 + RANDOM % 10))" = 3 ]; then _out="I'm sorry $(whoami), I can't do that for you."; $(if [ $(which cowsay) ]; then echo cowsay; else echo echo; fi) "$_out"; else cd; fi }
alias cd='cd_'
@acobster
acobster / .lando.yml
Created Sep 1, 2018
Lando Networking Issue
View .lando.yml
name: networking-bug
recipe: pantheon
config:
framework: wordpress
site: networking-bug
id: fake-site-id
@acobster
acobster / instructions.md
Created Jan 30, 2018
Scenario 4 Instructions
View instructions.md
  1. Retrieve TRANQ GUN and BLAST Rick & Morty
  2. Retrieve 2 vials (Blue & Yellow) + AMMONIA SALTS
  3. Place BLUE VIAL into HELMET and place on Rick
  4. Wait 60 seconds and then remove HELMET
  5. Reload with YELLOW VIAL and place on Morty
  6. Wait 60 seconds then remove HELMET
  7. Drag Rick & Morty to the TV COUCH
  8. Turn on INTERDIMENSIONAL CABLE
  9. Break the AMMONIA SALTS and wave under noses
  10. When Rick & Morty awake leave the room
View poc.ino
#include <Bounce2.h>
const int channel = 9;
const int LED = 14;
const int POT = 15;
const int DEBOUNCE_INTERVAL = 55;
int level;
@acobster
acobster / .bashrc
Created Jan 18, 2017
Customize bash prompt based on current cwd/environment
View .bashrc
# You want your prompt to warn you if you are in the directory tree of a production environment.
# Set the `LIVE_DIRS` array to the list of whatever directories should be considered production,
# and your prompt will contain a big, red "[PRODUCTION]" whenever you're in one of those directories,
# or a subdirectory thereof.
# Customize this variable
LIVE_DIRS=(/var/www/example.com /var/www/example2.com)
cwdEnvironment() {
local _live
@acobster
acobster / output
Created Jan 6, 2017
./cluster/kube-up.sh output
View output
$ ./cluster/kube-up.sh
... Starting cluster using provider: vagrant
... calling verify-prereqs
... calling kube-up
Bringing machine 'master' up with 'virtualbox' provider...
Bringing machine 'node-1' up with 'virtualbox' provider...
==> master: Box 'kube-fedora23' could not be found. Attempting to find and install...
master: Box Provider: virtualbox
master: Box Version: >= 0
==> master: Box file was not detected as metadata. Adding it directly...
View keybase.md

Keybase proof

I hereby claim:

  • I am acobster on github.
  • I am acobster (https://keybase.io/acobster) on keybase.
  • I have a public key ASCoxDMqIGdEVRgPACqiDJecZRkRXeyRy1oDKkVW2Bcz7go

To claim this, I am signing this object:

@acobster
acobster / 0_reuse_code.js
Created Jun 30, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.