Skip to content

Instantly share code, notes, and snippets.

@nicon-dev
nicon-dev / select-reset.css
Last active February 25, 2016 21:36
css reset for html SELECT : style select input - no border-radius but with the icon
select {
-webkit-appearance: none;
-moz-appearance: none;
background-position: right 50%;
background-repeat: no-repeat;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAMCAYAAABSgIzaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDZFNDEwNjlGNzFEMTFFMkJEQ0VDRTM1N0RCMzMyMkIiIHhtcE1NOkRvY3VtZW50
@nicon-dev
nicon-dev / popup-alert.js
Created July 20, 2015 21:52
IONIC: Popups
// Alert popup
// Just Text and one OK button
var alertPopup = $ionicPopup.alert({
title: 'Don\'t eat that!',
template: 'It might taste good'
});
alertPopup.then(function(res) {
console.log('Thank you for not eating my delicious ice cream cone');
});
@nicon-dev
nicon-dev / app.json
Created December 14, 2014 00:24
example app.json file for tutorial: Upgrading Sencha Touch and adding Cordova / Phonegap (the complete guide)
{
//PHONEGAP build
"builds": {
"web": {"default": true},
"phonegap": {
"packager": "phonegap",
"phonegap" : {
"config": {
// Uncomment the line below and add the platform you wish to build for
"platform": "android ios",
@nicon-dev
nicon-dev / cordova-commands.sh
Last active August 29, 2015 14:11
useful cordova/phonegap commands
#show corova/phonegap versions
npm info cordova version //show current version
npm info phonegap version
#show installed plugins
cordova plugin list
#add cordova plugins
cordova plugin add *gitrepo*
#example
@nicon-dev
nicon-dev / show-mediasize.php
Created December 11, 2014 14:27
show image dimensions in wordpress media library #wordpress
//show image dimentions in media library
function wh_column( $cols ) {
$cols["dimensions"] = "Dimensions";
return $cols;
}
function wh_value( $column_name, $id ) {
$meta = wp_get_attachment_metadata($id);
if(isset($meta['width']))
echo ' ' . $meta['width'].' x '.$meta['height'] . 'px';
}
@nicon-dev
nicon-dev / wp-config.php
Created December 11, 2014 10:25
wp-config DEBUG settings #wordpress #debug
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', false);
define('WP_DEBUG_DISPLAY', false);
@nicon-dev
nicon-dev / css-center.css
Last active June 12, 2016 13:55
CSS - centering techniques
/*1. center a div with margin: 0
- The element must display: block
- The element must not float
- The element must not have a fixed or absolute position
- The element must have a width that is not auto
2. Horizontal and vertical centering if the widths are dynamic:
*/
@nicon-dev
nicon-dev / custom-menu.php
Created December 2, 2014 02:20
display custom WP menu
//first create menu in WP admin area
//then show menu by name
wp_nav_menu( array('menu' => 'menu-name' ));
@nicon-dev
nicon-dev / revSlider-func.php
Created December 1, 2014 17:05
wordpress revolution slider php functions
$slider = new RevSlider();
$arrSliders = $slider->getArrSlidersShort(); // slider title
$my_slider_array = $slider->getAllSliderAliases(); // slider alias
@nicon-dev
nicon-dev / js-obj-debug.js
Created November 3, 2014 11:38
JS: debug Object
for (i in arr) {
console.log(i);
console.log(arr[i]);
}