Skip to content

Instantly share code, notes, and snippets.

View JoeKyy's full-sized avatar
🏠
Avalaible for remote jobs.

Jhomar "Joe" Nando JoeKyy

🏠
Avalaible for remote jobs.
View GitHub Profile
@JoeKyy
JoeKyy / nvm_fix.sh
Created October 21, 2018 02:11 — forked from itsmepetrov/nvm_fix.sh
Fix NVM to use from root (or sudo)
# StackOverflow: http://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo
# Source: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps
# The below command seems to fix the problem
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local
# The above command is a bit complicated, but all it's doing is copying whatever version of node
# you have active via nvm into the /usr/local/ directory (where user installed global files should
# live on a linux VPS) and setting the permissions so that all users can access them.
@DNA
DNA / bootstrap_shortcodes.php
Created June 7, 2017 04:05
WP shortcodes to apply bootstrap grid
<?php
// [col size="foo-value"]
// Create the function that will handle the shortcode
function grid_column($attributes, $content = null) {
// shortcode_atts is used to define default attribute values
$attributes = shortcode_atts(array('size' => '12'), $attributes);
// keep applying shortcodes to content
$content = do_shortcode($content);