Skip to content

Instantly share code, notes, and snippets.


Elliot Betancourt ebetancourt

View GitHub Profile
ebetancourt / wp-disable-plugin-update.php
Last active Jul 28, 2022 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
View wp-disable-plugin-update.php
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯
* Prevent update notification for plugin
* Place in theme functions.php or at bottom of wp-config.php
function disable_plugin_updates( $value ) {
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
ebetancourt / pre-commit
Created Apr 11, 2018
Pre-commit hook for project
View pre-commit
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$" | grep 'xometry_webapp/src/js')
ESLINT="$(git rev-parse --show-toplevel)/xometry_webapp/node_modules/.bin/eslint"
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
ebetancourt /
Last active Jan 18, 2018 — forked from rajraj/
Install ElasticSearch on Fedora or RHEL
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.x86_64 -y
sudo yum install wget
wget -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
View gist:306b71ce7ecea980b52b
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Market - responsive Newsletter with Template Builder</title>
<style type="text/css">
View application_controller.rb
class ApplicationController < ActionController::Base
def switch_database_connection
ActiveRecord::Base.establish_connection "production_user_fallback"
View bookmarklet-twitter-profie-ios
// Take the current page URL and put it in a variable called url
var url = document.URL;
// Create a new variable called tweetbotProfile and replace the mobile twitter url with the Tweetbot x-callback-url scheme
var tweetbotProfile = url.replace(/https:\/\/(mobile.)?\//,"tweetbot:///user_profile/");
// Go to the new URL in tweetbotProfile
window.location = tweetbotProfile;
ebetancourt / 0_reuse_code.js
Created Nov 4, 2013
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
View deploy.rb
after "deploy", "deploy:cleanup"
after "deploy:update_code", "composer:install"
before "composer:install", "composer:copy_vendors"
after "composer:install", "phpunit:run_tests"
namespace :composer do
desc "Copy vendors from previous release"
task :copy_vendors, :except => { :no_release => true } do
run "if [ -d #{previous_release}/vendor ]; then cp -a #{previous_release}/vendor #{latest_release}/vendor; fi"
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev
cd /tmp
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make install