Skip to content

Instantly share code, notes, and snippets.

View crtxdev's full-sized avatar

Miloš Živković crtxdev

View GitHub Profile
@crtxdev
crtxdev / WorldCountries.json
Created June 1, 2019 20:34
All countries JSON
[
{
"iso3": "AFG",
"iso2": "AF",
"uni": "4",
"undp": "AFG",
"faostat": "2",
"gaul": "1",
"name": "Afghanistan",
"officialName": "the Islamic Republic of Afghanistan"
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Åland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
{"name": "AndorrA", "code": "AD"},
{"name": "Angola", "code": "AO"},
{"name": "Anguilla", "code": "AI"},
{"name": "Antarctica", "code": "AQ"},
#!/usr/bin/env bash
vercomp () {
if [[ $1 == $2 ]]
then
echo '='
return
fi
local IFS=.
local i ver1=($1) ver2=($2)
@crtxdev
crtxdev / docker-cleanup-resources.md
Created August 15, 2018 21:52 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

jQuery(document).ready(function($){
var compiled_template = Hogan.compile([
'<div>',
'<a href="{{permalink}}" class="row">',
'<div class="col-xs-3"><img src="{{thumbnail}}" /></div>',
'<div class="col-xs-9">',
'<div class="vcenter">',
'<div class="vcenter-inner">',
'<strong>{{value}}</strong>',
'</div>',
@crtxdev
crtxdev / wp-query-ref.php
Created June 12, 2017 00:32 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@crtxdev
crtxdev / world_countries.sql
Created April 29, 2017 10:44
All World Countries SQL
CREATE TABLE `countries` (
`id` int(11) NOT NULL auto_increment,
`code` varchar(2) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
`name` varchar(100) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `countries` VALUES (null, 'AF', 'Afghanistan');
INSERT INTO `countries` VALUES (null, 'AL', 'Albania');
INSERT INTO `countries` VALUES (null, 'DZ', 'Algeria');