Skip to content

Instantly share code, notes, and snippets.

View ederrafo's full-sized avatar

Eder Rafo Jose Pariwana Espinhal ederrafo

View GitHub Profile
select partneruser::json->>'id', partneruser::json->>'name' from hotels where partneruser::json->>'id' = '8892'
select SUBSTRING(verificationdate::varchar, 1, 10),count(id)
--, verificationdate
FROM hotels where verificationdate is not null
group by 1
order by 1 desc
http://schinckel.net/2014/05/25/querying-json-in-postgres/
Display the installed Zend Framework version on the command line?
$ php composer.phar show --installed
Zend\ServiceManager
- invokables, an array of service name/class name pairs. The class name should be class that may be
directly instantiated without any constructor arguments.
- services, an array of service name/object pairs. Clearly, this will only work with PHP configuration.
@ederrafo
ederrafo / javascript.js
Last active February 4, 2020 16:57
js javascript
// load script after end load DOM
function downloadJSAtOnload() {
var element = document.createElement("script");
element.src = "defer.js";
@ederrafo
ederrafo / git.md
Last active September 22, 2022 17:06
git version

To revert git add, use this: $ git reset

git tag

supports two types of tags: lightweight and annotated (lijeras y anotadas) Git has the ability to tag specific points in history as being important.

$ git tag

search for tags that match a particular pattern. (Listing tag wildcards requires -l or --list option)

/*1*/
$ns = 'http://schemas.tourico.com/webservices/authentication';
$uri = 'http://demo-hotelws.touricoholidays.com/HotelFlow.svc?wsdl';
$options = array('trace' => 1,'use' => SOAP_LITERAL,'soap_version'=>SOAP_1_1,'compression' => SOAP_COMPRESSION_ACCEPT );
$_client = new soapclient($uri,$options);
$headerCredentials = array('LoginName'=>'user','Password'=>'pwd');
$headerCredentials = new SOAPHeader($ns, 'AuthenticationHeader', $headerCredentials);
$_client->__setSoapHeaders($headerCredentials);
@ederrafo
ederrafo / mysql-queries.md
Last active March 3, 2020 08:37
query, alter tables mysql

Insert masivo entre 2 tablas de diferentes bd

INSERT INTO test_modulo_cobranzas.accounts 
(id,
 business_unit_id, 
 name,
 country,
 city,
 email,
sematic-ui
https://github.com/jdc0589/JsFormat
https://github.com/rareyman/HTMLBeautify
http://stackoverflow.com/questions/8839753/how-do-i-reformat-html-code-using-sublime-text-2
web sockets
http://josedeveloper.com/2014/07/03/mi-receta-para-aprobar-la-oracle-certified-professional-java-se-7-programmer/
http://josedeveloper.com/2014/07/03/mi-receta-para-aprobar-la-oracle-certified-professional-java-se-7-programmer/
lib airbnd
http://www.dropwizard.io/
@ederrafo
ederrafo / php_print.sublime-snippet
Last active December 16, 2018 21:48
php snippet
<snippet>
<content><![CDATA[ echo "<pre>",__FILE__." on line ".__LINE__,": "; print_r(${1:this}); echo "</pre>"; ]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>php_print</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
@ederrafo
ederrafo / apache.md
Last active August 31, 2022 18:02
Todo sobre apache

403 Forbidden

You don't have permission to access /api/users/roles/3 on this server.

<Directory "/home/costamar">
        .
        .
        Require all granted
    </Directory>
@ederrafo
ederrafo / css.md
Last active March 10, 2019 18:29
Todo sobre css

line-height:

  • Apply CSS Style on all elements except with a SPECIFIC ID Use the :not selector: div:not(#div1){ color:red; }