Skip to content

Instantly share code, notes, and snippets.

View cabelotaina's full-sized avatar
🏠
Working from home

Maurilio Atila cabelotaina

🏠
Working from home
View GitHub Profile

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup

drush pml --no-core --type=module --status=enabled --pipe | xargs drush -y dis
@cabelotaina
cabelotaina / react_native_navbar.js
Created January 10, 2017 20:56
React Native Navbar working with this.props.navigator
render() {
return (
<Navigator
renderScene={this.renderScene.bind(this)}
navigator={this.props.navigator}
navigationBar={
<Navigator.NavigationBar
routeMapper={{
LeftButton: (route, navigator, index, navState) => {
return (

Keybase proof

I hereby claim:

  • I am cabelotaina on github.
  • I am cabelo (https://keybase.io/cabelo) on keybase.
  • I have a public key whose fingerprint is 6C9F 5CAA D77C 0E79 D52E 9331 CD0B 930F 19D6 F35D

To claim this, I am signing this object:

@cabelotaina
cabelotaina / Create-Custom-Fields-in-Woocommerce-Checkout-Page.md
Created April 20, 2017 15:08 — forked from nadeem-khan/Create-Custom-Fields-in-Woocommerce-Checkout-Page.md
Create Custom Fields in Woocommerce Checkout Page and Display them in Orders Details Page in Admin Area

Create Custom Fields in Woocommerce Checkout Page and Display them in Orders Details Page in Admin Area with this WordPress plugin:

<?php


/**
 * Plugin Name: Flowershop - WooCommerceCustomOverrides
 * Plugin URI: http://chillopedia.com
 * Description: Overrides WooCommerce Checkout Form Fields
  • Version: 1.0
@cabelotaina
cabelotaina / WP_API_OAuth_Test_client.php
Created July 24, 2017 03:13 — forked from kosso/WP_API_OAuth_Test_client.php
Test PHP client for Wordpress REST API v2.0 / OAuth1.0a 0.3.0
<?php
//opcache_reset(); // Disable local dev MAMP cache
/*
WP_API_OAuth_Test_client.php
Tested with Wordpress 4.7.1
WordPress REST API - OAuth 1.0a Server v.0.3.0 - https://en-gb.wordpress.org/plugins/rest-api-oauth1/
parser.y:192.8: error: invalid character in bracketed name: ‘0’
: [0-9]
^
parser.y:192.9: error: invalid character in bracketed name: ‘-’
: [0-9]
^
parser.y:192.10: error: invalid character in bracketed name: ‘9’
: [0-9]
^
parser.y:192.11: error: an identifier expected
scanner.cxx:560:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register yy_state_type yy_current_state;
^~~~~~~~~
scanner.cxx:561:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register char *yy_cp, *yy_bp;
^~~~~~~~~
scanner.cxx:561:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register char *yy_cp, *yy_bp;
^~~~~~~~~
scanner.cxx:562:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
namespace ast
{
enum {
PROGRAM,
SUBROUTINE,
FUNCTION,
STOP,
RETURN,
END,
@cabelotaina
cabelotaina / rss.js
Created January 21, 2019 22:00
get folha de sao paulo rss via nodejs
var https = require('https');
var xml2js = require('xml2js');
var parser = new xml2js.Parser();
parser.on('error', function(err) { console.log('Parser error', err); });
var data = '';
https.get('https://feeds.folha.uol.com.br/emcimadahora/rss091.xml', function(res) {
if (res.statusCode >= 200 && res.statusCode < 400) {