Skip to content

Instantly share code, notes, and snippets.

View viniciusbig's full-sized avatar

Vinicius Arantes viniciusbig

  • CI&T
  • Campinas - SP - Brazil
View GitHub Profile
@viniciusbig
viniciusbig / console.save.js
Created September 11, 2020 18:39
Chrome Snipet to save console log into files
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
@viniciusbig
viniciusbig / get-comments.js
Created September 11, 2020 18:41
Chrome snippet to get HTML comments with jQuery
jQuery.fn.comments = function( blnDeep ){
var blnDeep = (blnDeep || false);
var jComments = $( [] );
// Loop over each node to search its children for
// comment nodes and element nodes (if deep search).
this.each(
function( intI, objNode ){
var objChildNode = objNode.firstChild;
var strParentID = $( this ).attr( "id" );
@viniciusbig
viniciusbig / trakt.php
Created May 8, 2022 18:47
A simple PHP class for accessing the Trakt API
<?php
/**
* A simple class for accessing the Trakt API. You can use it like so:
*
* $trakt = new Trakt("You API Key");
* $trakt->showSeasons("The Walking Dead", true);
*
* You can view the list of available API methods here: http://trakt.tv/api-docs
* To call a method, such as "search/movies", the ``Trakt`` class will respond
* to the corresponding method name "searchMovies". So, in the above example, the
@viniciusbig
viniciusbig / 20220607135049_RemoveUsernameFromUsers.php
Created January 18, 2023 14:19
CakePHP Migration to remove Username in the login process -
<?php
declare(strict_types=1);
use Migrations\AbstractMigration;
class RemoveUsernameFromUsers extends AbstractMigration
{
/**
* Up Method.
*