Skip to content

Instantly share code, notes, and snippets.

@willbailey
willbailey / index.js
Created December 14, 2011 19:16
making property observation intrinsic to classes
'use strict';
var B = typeof exports !== 'undefined' ? exports : {};
// prefix for internal property state
var __PROP__ = '__PROP__';
// default constructor used in setting up prototype chain
var ctor = function() {};
B.extend = function(__super__, proto) {
@rodrigoborgesdeoliveira
rodrigoborgesdeoliveira / ActiveYouTubeURLFormats.txt
Last active April 26, 2024 10:33 — forked from ScottCooper92/gist:ea11b690ba4b1278e049
Example of the YouTube videos URL formats
http://www.youtube.com/watch?v=-wtIMTCHWuI
http://youtube.com/watch?v=-wtIMTCHWuI
http://m.youtube.com/watch?v=-wtIMTCHWuI
https://www.youtube.com/watch?v=lalOy8Mbfdc
https://youtube.com/watch?v=lalOy8Mbfdc
https://m.youtube.com/watch?v=lalOy8Mbfdc
http://www.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
http://youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
http://m.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
@bmaupin
bmaupin / free-backend-hosting.md
Last active April 26, 2024 10:32
Free backend hosting
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active April 26, 2024 10:32
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();
(function(){
var shadow$provide = {};
var SHADOW_IMPORT_PATH = "/home/yenda/status-react/target/test/cljs-runtime";
if (__dirname == '.') { SHADOW_IMPORT_PATH = "/home/yenda/status-react/target/test/cljs-runtime"; }
global.$CLJS = global;
global.shadow$provide = {};
try {require('source-map-support').install();} catch (e) {console.warn('no "source-map-support" (run "npm install source-map-support --save-dev" to get it)');}
global.CLOSURE_NO_DEPS = true;
// extension for jQuery
(function (root) {
if (root.Enumerable == null) {
throw new Error("can't find Enumerable. linq.jquery.js must load after linq.js");
}
if (root.jQuery == null) {
throw new Error("can't find jQuery. linq.jquery.js must load after jQuery");
}
@Himura2la
Himura2la / Grafana Alert Template.md
Last active April 26, 2024 10:31
How to use Grafana Alerts with the Telegram
  • Template name: telegram.message
  • Content:
    {{ define "alert_list" }}{{ range . }}{{ .Labels.alertname }}
    {{ range .Annotations.SortedPairs }}<strong>{{ .Name }}</strong>: {{ .Value }}
    {{ end }}| {{ if gt (len .GeneratorURL) 0 }}<a href="{{ .GeneratorURL }}">source</a> | {{ end }}{{ if gt (len .SilenceURL) 0 }}<a href="{{ .SilenceURL }}">silence</a> | {{ end }}{{ if gt (len .DashboardURL) 0 }}<a href="{{ .DashboardURL }}">dashboard</a> | {{ end }}{{ if gt (len .PanelURL) 0 }}<a href="{{ .PanelURL }}">panel</a> |{{ end }}
    —
    {{ end }}{{ end }}
    {{ define "telegram.message" }}
    

{{ if gt (len .Alerts.Firing) 0 }}FIRING!!!

@sunderls
sunderls / fbevents.js
Last active April 26, 2024 10:31
facebook pixel js prettified
/*1482118385,,JIT Construction: v2746767,en_US*/
/**
* Copyright Facebook Inc.
*
* Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*/
try {
(function(win, doc, location, history) {
'use strict';
@danstadler-pdx
danstadler-pdx / gist:2bdcfb20911b6a87303afdccc04f061c
Created February 7, 2019 22:18
browser snippet from the REST api
curl -X POST 'https://api.newrelic.com/v2/browser_applications.json' \
-H 'X-Api-Key:redacted' -i \
-H 'Content-Type: application/json' \
-d \
'{
"browser_application": {
"name": "made from REST api 2"
}
}'
@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active April 26, 2024 10:31
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory: