Skip to content

Instantly share code, notes, and snippets.

Sergio Costa zergiocosta

Block or report user

Report or block zergiocosta

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zergiocosta
zergiocosta / iOSPermission.md
Last active Aug 29, 2017
info.plist Permissions for iOS 10+
View iOSPermission.md

Calendar :

Key : Privacy - Calendars Usage Description
Value : $(PRODUCT_NAME) calendar events

Reminder :

Key : Privacy - Reminders Usage Description
Value : $(PRODUCT_NAME) reminder use

Contact :

Key : Privacy - Contacts Usage Description

View gist:f2f12e701bd348aaf2ecc8d354b3be28
$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods
[...]
1 gem installed
$ export PATH=$PATH:$HOME/Software/ruby/bin
$ pod --version
0.37.2
@zergiocosta
zergiocosta / metatags.php
Last active Jan 28, 2018
How to work even better with meta tags on WP (This should be inside <head> tag)
View metatags.php
<?php
/**
* Sets up theme default paths
*/
if(!defined('WP_SITE_URL')) { define('WP_SITE_URL', get_bloginfo('url')); }
if(!defined('WP_THEME_URL')) { define('WP_THEME_URL', get_stylesheet_directory_uri()); }
// General Variables
$mtitle_default = get_bloginfo('name');
$title_default = get_bloginfo('name');
@zergiocosta
zergiocosta / phonegap-alertbox.js
Last active Aug 31, 2015
Manipulating content into alert boxes
View phonegap-alertbox.js
// simple alert box
navigator.notification.alert(
"Alert body text",
myFunction, // function to be called when alert is triggered
'My alert title',
"Button"
);
function myFunction(){
console.log('working fine');
}
@zergiocosta
zergiocosta / custom_error_msgs
Last active Jul 8, 2019
Changing login error message (wp-admin)
View custom_error_msgs
<?php
// Insert into your functions.php and have fun creating login error msgs
function guwp_error_msgs() {
// insert how many msgs you want as an array item. it will be shown randomly
$custom_error_msgs = array(
'<strong>YOU</strong> SHALL NOT PASS!',
'<strong>HEY!</strong> GET OUT OF HERE!',
);
// get random array item to show
return $custom_error_msgs[array_rand($custom_error_msgs)];;
@zergiocosta
zergiocosta / jQuery UI datepicker pt-br
Created May 18, 2015
Tradução do módulo datepicker do jQuery UI para português brasileiro
View jQuery UI datepicker pt-br
jQuery(function($){
$.datepicker.regional['pt-BR'] = {
closeText: 'Fechar',
prevText: '&#x3c;Anterior',
nextText: 'Pr&oacute;ximo&#x3e;',
currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
'Jul','Ago','Set','Out','Nov','Dez'],
View File structure for general projects
|
├── api/
├── assets/
│ │ css/
│ │ ├── plugins.css
│ │ ├── print.css
│ │ └── style.css
│ │ fonts/
│ │ images/
│ │ ├── bgs/
You can’t perform that action at this time.