Skip to content

Instantly share code, notes, and snippets.

Avatar

Vinicius Arantes viniciusbig

  • CI&T
  • Campinas - SP - Brazil
View GitHub Profile
@viniciusbig
viniciusbig / console.save.js
Created Sep 11, 2020
Chrome Snipet to save console log into files
View console.save.js
(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 Sep 11, 2020
Chrome snippet to get HTML comments with jQuery
View get-comments.js
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
A simple PHP class for accessing the Trakt API
View trakt.php
<?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