Skip to content

Instantly share code, notes, and snippets.

View brenopolanski's full-sized avatar
🦙
Llama Llama

Breno Polanski brenopolanski

🦙
Llama Llama
View GitHub Profile
@rambabusaravanan
rambabusaravanan / detect-js-framework.js
Last active May 10, 2024 14:34
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]') ||
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer')))
)
console.log('React.js');
if(!!document.querySelector('script[id=__NEXT_DATA__]'))
console.log('Next.js');
@dreamorosi
dreamorosi / standardJS-in-CRA.md
Last active August 16, 2022 17:33
Add Standard JS to create-react-app project

Standard JS in create-react-app

I've been using create-react-app lately as I find it very useful to kick things off while starting a project. I almost always follow JavaScript Standard Style and I found myself googling it so I figured out I should write it down.

Get Standard JS

I really like keeping dependencies as local as possible but if you prefer you can install it globally.

yarn add standard --dev

or

@ericclemmons
ericclemmons / example.md
Last active April 24, 2024 18:09
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
var name = $(this.el).find("input[name='connname']").val();
var path = $(this.el).find("select[name='csvpath']").val();
var enabled = false;
if(schema.has.been.created){
var mondrianschema = $(this.el).find(".schemaselect").val();
enabled = true;
}
var c = "type=OLAP\n"+
"name="+name+"\n"+
"driver=mondrian.olap4j.MondrianOlap4jDriver\n"+
@gorangajic
gorangajic / es6-spread-immutable-cheatsheet.md
Last active April 11, 2024 08:32
es6 spread immutable cheatsheet

update object

var state = {
    id: 1,
    points: 100,
    name: "Goran"
};

var newState = {
@brenopolanski
brenopolanski / ftp.md
Last active November 8, 2015 15:14
FTP via linha de comando

Conectando

ftp endereço ip / nome do host <ENTER>
coloque o seu nome de usuário <ENTER>
coloque a sua senha <ENTER>

Baixando uma pasta via comando wget

@gokulkrishh
gokulkrishh / media-query.css
Last active May 8, 2024 06:59
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@brenopolanski
brenopolanski / saiku-external-node.md
Created September 16, 2015 14:36
Saiku external working with Node.js
var port = process.env.C9_PORT || parseInt(argv[2], 10) || 8081;
var backend_host = argv[3] || 'repo.meteorite.bi';
var backend_port = argv[4] || 9999;
@brenopolanski
brenopolanski / check-select-list.md
Created September 15, 2015 13:00
Check if value is in select list with JQuery
var x = 'foo';
var exists = 0 != $('#select-box option[value=" + x + "]').length;
@brenopolanski
brenopolanski / leaflet-https.md
Created September 12, 2015 23:40
Leaflet working with HTTPS