Skip to content

Instantly share code, notes, and snippets.

@umanghome
umanghome / publish.yml
Last active February 7, 2026 21:49
GitHub Action: Generate a build and push to another branch
# .github/workflows/publish.yml
name: Generate a build and push to another branch
on:
push:
branches:
- master # Remove this line if your primary branch is "main"
- main # Remove this line if your primary branch is "master"
jobs:
@JosePedroDias
JosePedroDias / debug_cookie_set.js
Created July 13, 2020 18:02
tampermonkey userscripts for cookies and localStorage
@DerFichtl
DerFichtl / tampermonkey-adblock-block.md
Last active November 12, 2025 12:09
Tampermonkey Adblock Script - This Ad-Blocker is running on pages with Adblock-detectors and can remove or click elements to cleanup before you start browsing.
layout post
title Tampermonkey ad-blocker
published true
tags
adblock
tampermonkey
browser

This ad-blocker script for Tampermonkey won't trigger an adblock-block / adblock-detector script and so you could use it for pages that are annoying you with "please turn of your adblock" messages. It's just hiding the ads and don't try to intercept the requests or remove the ads at all. So it don't make the websites faster, but it makes them cleaner and easier to read.

This script is not a generic solution and has to be configured for every website it should clean up. I don't provide configs for pages, just use your browser developer-tools to find the elements you want remove or click.

@sidcoelho
sidcoelho / mysqldump
Created August 2, 2019 17:20
Mysqldump client for DBeaver with Docker (without installing mysql-client)
#!/bin/sh
# File location: /usr/local/bin/mysqldump
# File permission: +x
docker run --rm mysql:latest /usr/bin/mysqldump
@VassilisPallas
VassilisPallas / countdown.js
Created March 24, 2019 19:25
Simple countdown timer without the usage of setInterval
function sleep(delay) {
var start = new Date().getTime();
while (new Date().getTime() < start + delay) ;
}
function convertTime(hours) {
var realHours = Math.floor(hours);
var minutes = (hours - realHours) * 60;
var realMinutes = Math.round(minutes);
var realSeconds = ((hours - realHours) + (minutes - realMinutes)) * 60;
@bmaupin
bmaupin / free-database-hosting.md
Last active July 9, 2026 16:44
Free database hosting
@dan1wang
dan1wang / README.MD
Created May 31, 2018 16:08
Executing App Script functions in Firebase Cloud Functions

If you are using Firebase on a Spark (free) plan, you can only make outbound networking requests to Google services. Unfortunately, that does not include Web app deployed from App Script (script.google.com/macros/s/.../exec). (Stackoverflow #43330192)

This is a crude example showing how to execute Apps Script using the scripts.run method of Apps Script API.

In this example, the Firebase app does not store the user's OAuth id token, does not validate the access token (e.g. the access token is issued for your project, not someone else's), and does not store the refresh token (access token will expire 60min after issue if not refreshed). For production, these issues must be resolved.

@jigewxy
jigewxy / child.js
Created February 9, 2018 09:54
node.js fork example --> parent/child process increment and interchange the count variable until >100
var count =Math.floor(Math.random()*100);
process.on('message', (msg)=>{
console.log("CHILD: message received from parent process", msg);
count = parseInt(msg) +1;
console.log("CHILD: +1 from child");
@DavidWells
DavidWells / serverless.yml
Created September 15, 2017 05:39
DynamoDB custom index serverless.yml example
service: service-name
provider:
name: aws
runtime: nodejs6.10
functions:
myfunc:
handler: handler.myfunc
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active May 4, 2026 20:31
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}