Skip to content

Instantly share code, notes, and snippets.

View netdesignr's full-sized avatar
🎯
@(^-^)@

Mihai Diaconita netdesignr

🎯
@(^-^)@
View GitHub Profile
@netdesignr
netdesignr / remove_a_full_directory_linux_commands.txt
Last active June 16, 2018 20:18
Remove a full directory in Linux
# To remove a directory that contains other files or directories, use the following command
rm -r mydir
# Delete everything with no prompt messages
rm -rf mydir
@netdesignr
netdesignr / SSL_ERROR_SYSCALL.txt
Created June 13, 2018 14:58
OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to hashicorp-files.hashicorp.com:443
vagrant init geerlingguy/ubuntu1604 --box-version 1.1.7
@netdesignr
netdesignr / Vagrant_up_failed.txt
Created June 13, 2018 14:21
Vagrant up failed, /dev/vboxnetctl: no such file or directory
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
@netdesignr
netdesignr / README.md
Created June 6, 2018 11:37 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
# create working directory from trunk
svn checkout http://somedomain.com/repo/trunk
# create a branch
svn copy http://somedomain.com/repo/trunk \
http://somedomain.com/repo//branches/feature-do-awesome-thing \
-m "Created branch to implement feature do awesome thing."
# switch working copy
svn switch ^/repo/branches/feature-do-awesome-thing
@netdesignr
netdesignr / auto_make_list.txt
Created April 1, 2018 13:54
Auto make list
Acura
Aixam
Alfa Romeo
Alta
Aro
Aston Martin
Audi
Austin
Bentley
BMW
@netdesignr
netdesignr / country_list.txt
Created January 28, 2018 20:49
Country list in plain text
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
@netdesignr
netdesignr / currency_list_of_the_world_plain.text
Last active January 28, 2018 14:26
ISO code currency list of the world in plain text
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
@netdesignr
netdesignr / Output each-category-followed-by-a-comma
Created July 6, 2017 16:16
Get Wordpress categories of the post and output each category with no link the attached followed by a comma
/**
* Get categories of the post
* Remove the links
* Output each category followed by a comma
* Comma is not added on the last item
* @param $arr e.g. get_the_category()
*/
function get_cat_profile($arr)
{
$counter = 0;
@netdesignr
netdesignr / Check-if-shortcode-exists-in-page-and-echo-something
Last active July 6, 2017 13:12
Check if short-code exists in page and echo something inside Wordpress dashboard
/**
* Check if shortcode exists in page and echo something in Wordpress dashboard
*/
function check_if_shortcode_exists_in_page_and_echo_something()
{
global $post;
if (function_exists('get_current_screen')
&& function_exists('has_shortcode')
&& function_exists('is_admin')
) {