Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Renan Coelho sayhicoelho

🏠
Working from home
Block or report user

Report or block sayhicoelho

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sayhicoelho
sayhicoelho / AccordionGroup.vue
Last active May 20, 2020
Vue.js accordion component
View AccordionGroup.vue
<template>
<div class="accordion-group">
<slot />
</div>
</template>
<script>
export default {
name: 'AccordionGroup',
}
View pure-js-accordion.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS Accordion</title>
<style>
* {
margin: 0;
padding: 0;
@sayhicoelho
sayhicoelho / getCssSelector.js
Created May 20, 2020
Get element CSS selector using JS
View getCssSelector.js
// ref: https://stackoverflow.com/a/57503796/4158755
// Thanks to Yassine!
function getCssSelector(el) {
const names = []
do {
let index = 0
let cursorElement = el
@sayhicoelho
sayhicoelho / event_emitter.dart
Last active May 9, 2020
Custom EventEmitter for Dart
View event_emitter.dart
class Listener {
final String eventName;
final void Function([Object]) callback;
Listener(this.eventName, this.callback);
}
class EventEmitter {
final _listeners = <Listener>[];
@sayhicoelho
sayhicoelho / EventEmitter.js
Last active May 9, 2020
Custom EventEmitter for Javascript
View EventEmitter.js
class EventEmitter {
constructor() {
this.listeners = []
}
addListener(event, listener) {
this.listeners.push({ event, listener })
}
removeListener(event, listener) {
@sayhicoelho
sayhicoelho / ensureFileIsPresent.js
Created May 6, 2020
Node.js & Multer check if file is present in the request.
View ensureFileIsPresent.js
module.exports = (req, res, next) => {
if (!req.file) {
res.status(422).json({ message: 'The file is required.' });
} else {
next();
}
}
@sayhicoelho
sayhicoelho / CustomSearchable.dart
Last active May 2, 2020
Flutter Searchable Input
View CustomSearchable.dart
import 'package:flutter/material.dart';
import './custom_searchable_dialog.dart';
import './custom_text_field.dart';
class CustomSearchableItem<T> {
final String label;
final T value;
CustomSearchableItem({
@required this.label,
View config.ini
[account]
first_login_game = 0
[settings]
open_music = 1
voice_language = english
graphic_lvl_reported = 1
match_type = 100004
[basic_setting]
View buzzr.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Buzzr: Fale com desconhecidos</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
@sayhicoelho
sayhicoelho / fuckyouuselesscomments.js
Created Jan 5, 2020
Remove useless comments from Facebook automatically using Tampermonkey.
View fuckyouuselesscomments.js
// ==UserScript==
// @name Fuck you useless comments!
// @namespace http://tampermonkey.net/
// @version 0.0.1
// @description Remove useless comments from Facebook.
// @author Renan Coelho <sayhicoelho@gmail.com>
// @match https://www.facebook.com/*
// @grant none
// ==/UserScript==
You can’t perform that action at this time.