Skip to content

Instantly share code, notes, and snippets.

View ricardoparro's full-sized avatar

Ricardo Parro ricardoparro

View GitHub Profile
@powerc9000
powerc9000 / translations.md
Last active November 27, 2018 15:57
Translations with Firebase

At my place of work we were doing translations with json files and key value pairs.

eg. en-US.json

{
  "this_key": "Translates to this"
}
@coopermaruyama
coopermaruyama / disable-netflix-pauses.js
Last active February 4, 2025 13:37
Netflix: Disable "Are you still watching?" pauses
// copy/paste into chrome console (alt+cmd+J) after the video starts playing.
setInterval(function() {
var possibleButtons = document.getElementsByClassName('continue-playing');
if (possibleButtons.length) {
for (var i = 0; i < possibleButtons.length; i++) {
if (/Continue Playing/.test(possibleButtons[i].textContent)) {
var event = document.createEvent('HTMLEvents');
event.initEvent('click', true, false);
possibleButtons[i].dispatchEvent(event);
}
@staltz
staltz / introrx.md
Last active April 8, 2025 04:41
The introduction to Reactive Programming you've been missing
@chrishunt
chrishunt / podcasts.md
Last active March 20, 2023 14:22
Podcast List
@nikcub
nikcub / Spotify.scpt
Created August 20, 2012 16:43
Mute Spotify Ads
--Mute Spotify when ads are playing. Use if in a country where you can't
--purchase a pro account. Open AppleScript editor (Applications > Utilities)
--paste this script in and then go File -> Save As, change 'File Format' to
--'Application' and save somewhere. Run Spotify using that application.
set currentTrack to ""
do shell script "open -a \"Spotify\""
delay 5
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb:
@gennad
gennad / BFSDFS.java
Created January 23, 2011 09:14
Breadth-first search and depth-first search Java implementation
Class Main {
public void bfs()
{
// BFS uses Queue data structure
Queue queue = new LinkedList();
queue.add(this.rootNode);
printNode(this.rootNode);
rootNode.visited = true;
while(!queue.isEmpty()) {
Node node = (Node)queue.remove();
@igrigorik
igrigorik / webapp.rb
Created November 13, 2010 21:28
Inspired by @JEG2's talk at Rubyconf... Any ruby object, as a webapp! 'Cause we can. :-)
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end