Skip to content

Instantly share code, notes, and snippets.

View carmelosantana's full-sized avatar
🥑

Carmelo Santana carmelosantana

🥑
View GitHub Profile
@carmelosantana
carmelosantana / resume.json
Last active July 23, 2024 18:19
Resume - WordPress
{
"basics": {
"name": "Carmelo Santana",
"label": "Senior Staff Engineer",
"image": "",
"email": "resume@carmelosantana.com",
"phone": "+1 (201) 338-0755",
"url": "https://carmelosantana.com",
"summary": "Experienced WordPress leader with a passion for wellness and personal growth. I excel at designing and implementing custom WordPress solutions that streamline digital workflows, optimize site performance, and ensure seamless user experiences.",
"location": {
@carmelosantana
carmelosantana / memcached-wp-help.php
Created January 2, 2019 16:01
Some notes when using wp_cache + memcache
<?php
// Rather than making many calls to grab data, especially related data, you can grab it in one hop.
// https://scotty-t.com/2012/06/05/memcached-redux/
wp_cache_get_multi( array(
array( 'key', 'group' ),
array( 'key', '' ),
array( 'key', 'group' ),
'key'
) );
<?php
define('DB_HOST', '127.0.0.1');
define('DB_USER', 'root');
define('DB_PASS', 'password');
define('DB_NAME', 'school');
class CustomDatabase
{
private $db;
@carmelosantana
carmelosantana / install-webmin.sh
Last active January 5, 2017 21:27
Installs webmin tested on Ubuntu 16.04.
#!/bin/sh
# install-webmin v0.1.3
echo "Install webmin?"
echo -n "Press y|Y for Yes, any other key for No: "
if echo "$answer" | grep -iq "^y" ;then
exit 1
fi
wget -O - http://www.webmin.com/jcameron-key.asc | sudo apt-key add -
echo "deb http://download.webmin.com/download/repository sarge contrib" | sudo tee -a /etc/apt/sources.list
echo "deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib" | sudo tee -a /etc/apt/sources.list
@carmelosantana
carmelosantana / WP plugin zip
Created April 9, 2014 16:13
Properly zipped plugin folder, ready for the repo.
zip -r PLUGIN.zip PLUGIN -x *.DS_Store -x *.svn* -x *.git*
@carmelosantana
carmelosantana / gist:9143546
Created February 21, 2014 21:07
simple line count via terminal
wc -l `find . -iname "*.php"`
@carmelosantana
carmelosantana / diaspora-update
Created February 11, 2011 14:20
update diaspora* from git
git pull
bundle install
// if error
git checkout ./
// will rake DB thats set (default = developer)
bundle exec rake db:migrate
// if you run jammit