Skip to content

Instantly share code, notes, and snippets.

View nncl's full-sized avatar

Cauê Almeida nncl

View GitHub Profile
<?php
global $post;
$args = array( 'taxonomy' => 'product_cat',);
$terms = wp_get_post_terms($post->ID,'product_cat', $args);
$count = count($terms);
if ($count > 0) {
foreach ($terms as $term) {
echo '<div style="direction:rtl;">';
@bumble-bee-chuna
bumble-bee-chuna / gist:af5099dc44319a88e23f
Last active February 26, 2016 11:31
Best tutorials
Best tutorials EVER:
Print Oracle SQL Developer Result to CSV
http://stackoverflow.com/questions/4168398/how-to-export-query-result-to-csv-in-oracle-sql-developer
Install cx_Oracle on RHEL Linux machine... a GOD SEND:
http://ubuntugeeknerd.blogspot.com/2013/08/how-to-install-oxoracle-in-rhel-64-bit.html
@kylefox
kylefox / gulpfile.js
Created January 15, 2016 17:28
I moved bower dependencies in my Ionic app from `./www/lib` to `./bower_modules` in order to slim down the resulting "www" package. Here are the gulp settings/tasks I use to compile/concatenate everything into `./www/js/libs.js`
var paths = {
// Manually specify the bower resources we actually need.
// This way our index simply has: <script src="js/libs.js"></script>
bower: {
scripts: [
"./bower_modules/ionic/js/ionic.bundle.js",
"./bower_modules/angular-resource/angular-resource.js",
],
fonts: [
"./bower_modules/ionic/fonts/**.*",

Favicon

Como gerar?: http://www.favicon-generator.org/

Link sobre: http://tableless.com.br/favicons/

<!--Tamanhos para desktop e Android-->
<link rel="shortcut icon" href="/favicon.ico">
<link rel="icon" sizes="192x192"  href="/favicon-192x192.png">
<link rel="icon" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" sizes="96x96" href="/favicon-96x96.png">
angular.module('utils.filters', [])
.filter('removeAccents', removeAccents);
function removeAccents() {
return function (source) {
var accent = [
/[\300-\306]/g, /[\340-\346]/g, // A, a
/[\310-\313]/g, /[\350-\353]/g, // E, e
/[\314-\317]/g, /[\354-\357]/g, // I, i
/[\322-\330]/g, /[\362-\370]/g, // O, o
@bennadel
bennadel / code-1.htm
Created March 25, 2014 00:49
Maintaining Line Breaks In An HTML-Excel File
<br style="mso-data-placement:same-cell;" />
@lricoy
lricoy / app.ts
Last active January 11, 2017 14:10
Simple Angular2/Ionic2 auth
//TODO: Validar os operadores necessários para diminuir o tamanho
import 'rxjs/Rx';
import {App, Platform} from 'ionic-angular';
import {StatusBar} from 'ionic-native';
import {LoginPage} from './pages/login/login';
import {HttpClient} from "./common/providers/http";
@allenhwkim
allenhwkim / gist:be508558869f322e7697
Created October 22, 2014 14:48
Angular Google Maps Fit Bounds
<!doctype html>
<html ng-app="myapp">
<head>
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script src="http://code.angularjs.org/1.2.25/angular.js"></script>
<script src="https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/scripts/ng-map.js"></script>
<script>
var app = angular.module('myapp', ['ngMap']);
app.controller('MyCtrl', function($scope) {
$scope.positions = [ [-24,132] ,[-25,131] ,[-26,130] ];
@nncl
nncl / Be MEAN Instagram - MongoDB.md
Last active September 7, 2017 21:12
Be Mean Instagram

Be MEAN Instagram - MongoDB

Getting Started

Configure your CLI to MongoDB, bro:

$ 
@amio
amio / ng-filter-ago.js
Created April 25, 2014 08:54
Angular filter for transforming a date to 'xxx days ago'
'use strict';
angular.module('Utils', [])
/**
* Transform a date to 'xxx days ago'
*/
.filter('ago', function () {
return function (input) {