Skip to content

Instantly share code, notes, and snippets.

View lucasbrigida's full-sized avatar

Lucas Pereira Brígida lucasbrigida

View GitHub Profile
@lucasbrigida
lucasbrigida / baseConverter.js
Created March 20, 2018 17:21 — forked from faisalman/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <[email protected]>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@lucasbrigida
lucasbrigida / wget
Created March 16, 2018 13:38 — forked from bueckl/wget
Wget examples
#Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html example.com
@lucasbrigida
lucasbrigida / JETBRAINS_LICENSE_SERVER.txt
Created February 28, 2018 14:15
JETBRAINS - LICENSE SERVER
http://idea.ibdyr.com
@lucasbrigida
lucasbrigida / webstorm-10-serial
Created February 28, 2018 14:12
Serial webstorm 10
Product : WebStorm
UserName : huyna
===== LICENSE BEGIN =====
7818-D51015T
00001Cxp!cR4EfDn!iIbK"OvW8!I!!
yyrFW9ENEnARjcWLavSdkvIMTb"n6Y
GlzF"HaQM8N1tje!MD77gHt8N5zljN
===== LICENSE END =====
@lucasbrigida
lucasbrigida / gist:cb390335339a6bdfdf0f721ed63e699d
Created March 23, 2017 09:48 — forked from yiling-chen/gist:88f263804b4cc764b6fa
Convert a fisheye image to panorama view
#include <cmath>
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace cv;
int main(int argc, const char * argv[]) {
Mat img = imread("lillestromfisheye.jpg");
// assume the source image is square, and its width has even number of pixels
function SV() {
var createModal = function () {
if (document.getElementById('salaovip-booking-widget-modal')) return;
var iframe = document.createElement('iframe');
iframe.style.height = '550px';
iframe.style.width = '600px';
var modal = document.createElement('div');
var modalStyle = 'display:none;border:none;position:absolute;text-align:center;width:100%;top:0;padding-top:10vh;z-index:999;height:100vh;background-color: rgba(0, 0, 0, 0.5);';
function DA() {
var $ = $ || jQuery;
var DEFAULT_OPTIONS = {
adsBackground: '#000000',
skipControlsColor: '#fff',
skipControlsBorder: '1px solid #fff',
skipControlsElem: '<div class="skip-controls" style="' +
'text-align: right;font-size: 14px;padding: 5px;position: absolute;' +
'bottom: 0;right: 0;"><a class="skip-button" href="#" ' +
'style="display: inline-block;padding: 5px;"><span class="skip-text"></span>' +
@lucasbrigida
lucasbrigida / notification.js
Last active December 15, 2016 21:02
notification.js
function N() {
var notify = function(title, options) {
// Let's check if the browser supports notifications
if (!("Notification" in window)) {
alert(options.body || "This browser does not support desktop notification");
}
// Let's check whether notification permissions have already been granted
else if (Notification.permission === "granted") {
// If it's okay let's create a notification
@lucasbrigida
lucasbrigida / getCreditCardBrand.js
Last active December 5, 2016 20:04
Get Credit Card Brand
/*
DISCLAIMER: This code is part of pagarme.js
Reference - https://github.com/pagarme/pagarme-js/blob/master/dist/pagarme.js
*/
var getCreditCardBrand = function(cardNumber) {
if(!cardNumber) {
return null;
}