Skip to content

Instantly share code, notes, and snippets.

View dancr13's full-sized avatar
๐Ÿ˜Ž

Daniel dancr13

๐Ÿ˜Ž
View GitHub Profile
@dancr13
dancr13 / PY0101EN-4.2_API_2.ipynb
Created November 12, 2020 20:04
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dancr13
dancr13 / 4.3_notebook_quizz_pandas.ipynb
Created November 11, 2020 23:35
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dancr13
dancr13 / PY0101EN-4-1-ReadFile.ipynb
Created November 11, 2020 23:00
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dancr13
dancr13 / PY0101EN-1-2-Strings.ipynb
Created November 9, 2020 16:48
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dancr13
dancr13 / PY0101EN-1-1-Types.ipynb
Created November 9, 2020 15:23
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dancr13
dancr13 / custom-template-plugin.php
Created July 17, 2019 16:56 — forked from ashokmhrj/custom-template-plugin.php
Get Template Part From plugin directory
<?php
/**
* The below function will help to load template file from plugin directory of wordpress
* Extracted from : http://wordpress.stackexchange.com/questions/94343/get-template-part-from-plugin
*/
define('PLUGIN_DIR_PATH','Your-plugin-directory-path');
function ccm_get_template_part($slug, $name = null) {
do_action("ccm_get_template_part_{$slug}", $slug, $name);
@dancr13
dancr13 / emun.php
Created June 6, 2019 17:14
Emum solution for PHP
abstract class OpServicesTypes {
const NEWT = 'new';
const RENEW = 'renew';
const REPLACE = 'replace';
const CHANGEADDRESS = 'change-of-address';
const CHANGEOFNAME = 'change-of-name';
}
example: OpServicesTypes::NEWT
@dancr13
dancr13 / gist:33665e04e933c8b46f9180f2adc1c43a
Last active March 8, 2019 21:04
Creating a cookie with a array
<script>
function getCookie(c_name) {
if (document.cookie.length > 0) {
c_start = document.cookie.indexOf(c_name + "=");
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) {
c_end = document.cookie.length;
}
@dancr13
dancr13 / gist:e4705eb5342f581ca0d86acc9a71aa57
Created February 8, 2019 20:42
DOCKER: Wordpress+mariadb+phpmyadmin
wordpress:
image: wordpress
links:
- wordpress_db:mysql
ports:
- 8080:80
volumes:
- ./wp-content/:/var/www/html/wp-content
wordpress_db:
image: mariadb
<?php
wp_nav_menu(array(
'theme_location' => 'header-menu',
'container' => false,
'menu_class' => 'nav-list',
'walker' => new Walker_Simple_Example(),
));