Skip to content

Instantly share code, notes, and snippets.

View marcosvpj's full-sized avatar

Marcos Vinicios Pagelkopf junior marcosvpj

View GitHub Profile
@marcosvpj
marcosvpj / outlook-calendar-focus-mode.user.js
Last active October 19, 2023 12:59
Userscript to hide non-essential elements to focus on day events
// ==UserScript==
// @name Remove non-essential elements on https://outlook.office.com/calendar/view/workweek
// @namespace Violentmonkey Scripts
// @match https://outlook.office.com/calendar/view/*
// @grant GM_addStyle
// @version 1.1
// @author marcosvpj
// @description 10/11/2023, 9:22:35 AM
// ==/UserScript==
@marcosvpj
marcosvpj / vscode-remove-duplicate-lines.md
Last active July 17, 2024 19:08
How to remove duplicate lines in Visual Studio Code?

If the order of lines is not important##

Sort lines alphabetically, if they aren't already, and perform these steps:
(based on this related question: https://stackoverflow.com/q/1573361/3258851)

  1. Control+F

  2. Toggle "Replace mode"

  3. Toggle "Use Regular Expression" (the icon with the .* symbol)

@marcosvpj
marcosvpj / great.css
Created April 27, 2019 14:21
58 bytes of css to look great nearly everywhere
/*
58 bytes of css to look great nearly everywhere
Based on https://jrl.ninja/etc/1/
*/
main {
max-width: 70ch;
padding: 2ch;
margin: auto;
}
### Keybase proof
I hereby claim:
* I am marcosvpj on github.
* I am marcosvpj (https://keybase.io/marcosvpj) on keybase.
* I have a public key ASBsrgFL9gpybj09qBc97qKyNbUl72Kf0Lw5StI0A3RmvQo
To claim this, I am signing this object:
@marcosvpj
marcosvpj / angularjs-count-watchers.js
Created August 17, 2018 17:09
AngularJS - Contar quantidade de watchers ativos
(function () {
var root = angular.element(document.getElementsByTagName('body'));
var watchers = [];
var f = function (element) {
angular.forEach(['$scope', '$isolateScope'], function (scopeProperty) {
if (element.data() && element.data().hasOwnProperty(scopeProperty)) {
angular.forEach(element.data()[scopeProperty].$$watchers, function (watcher) {
watchers.push(watcher);
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/php");</script>