Skip to content

Instantly share code, notes, and snippets.

View fmoliveira's full-sized avatar

Filipe Oliveira fmoliveira

  • Level Access
  • Toronto
  • 04:54 (UTC -04:00)
View GitHub Profile
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active May 31, 2024 15:49
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@yocontra
yocontra / aoe2hd.md
Last active June 9, 2023 18:28
Age of Empires II HD - For Mac OSX
@fdaciuk
fdaciuk / lazy-img.jsx
Last active December 8, 2022 18:38
React Lazy img load component
'use strict'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
class LazyImg extends Component {
constructor () {
super()
this.state = { loaded: false }
this.img = {}
@geoffreydhuyvetters
geoffreydhuyvetters / react_fiber.md
Last active January 13, 2023 06:49
What is React Fiber? And how can I try it out today?
@sibelius
sibelius / Info.plist
Created November 17, 2016 15:34
ios 10 permissions
<!-- 🖼 Photo Library -->
<key>NSPhotoLibraryUsageDescription</key>
<string><Your description goes here></string>
<!-- 📷 Camera -->
<key>NSCameraUsageDescription</key>
<string><Your description goes here></string>
<!-- 🎤 Microphone -->
<key>NSMicrophoneUsageDescription</key>
@davej
davej / fetch-timeout.js
Last active July 1, 2022 23:35
Add a pseudo timeout/deadline to a request using the ES6 fetch api
Promise.race([
fetch('/foo'),
new Promise((_, reject) =>
setTimeout(() => reject(new Error('Timeout')), 7000)
)
]);
@jaceklaskowski
jaceklaskowski / dcos.md
Last active June 30, 2018 12:13
Introduction to DC/OS
@ankurk91
ankurk91 / github_gpg_key.md
Last active April 9, 2024 16:34
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
// put this at the top of your app
const setState = Component.prototype.setState
Component.prototype.setState = function(nextState) {
console.group(this.constructor.name)
console.trace()
if (this.shouldComponentUpdate) {
console.log('shouldComponentUpdate', (
this.shouldComponentUpdate(this.props, nextState)
))
}
@psamsotha
psamsotha / main.ts
Created July 8, 2016 04:28
Get external configuration file before bootstrap in Angular 2. See also https://blog.sstorie.com/providing-external-data-when-bootstrapping-angular-2/
import { bootstrap } from '@angular/platform-browser-dynamic';
import { HTTP_PROVIDERS } from '@angular/http';
import { Http,
Request,
Response,
XSRFStrategy,
CookieXSRFStrategy } from '@angular/http';
import { Injector,
ReflectiveInjector } from '@angular/core';
import { Observable } from 'rxjs/Rx';