Skip to content

Instantly share code, notes, and snippets.

View Serrin's full-sized avatar

Ferenc Czigler Serrin

  • Budapest
View GitHub Profile
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active May 16, 2025 10:07
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@zed-dz
zed-dz / offline_mdn_docs.md
Created March 12, 2019 14:01
Offline MDN Docs
@jacurtis
jacurtis / no-right-click-on-images.js
Last active November 25, 2019 18:08
Removes right-click on images
/*
* This script will look for all images on a page and prevent right clicking on an image.
*/
const images = document.getElementsByTagName('img');
for(var i = 0; i < images.length; i++) {
images[i].addEventListener('contextmenu', event => event.preventDefault());
}
// Note: I threw this script together as requested by a subscriber. I personally don't recommend doing
@yidas
yidas / js-encode-decode.md
Last active April 6, 2022 15:26
JavaScript HTML Entities Encode & Decode
@yohhoy
yohhoy / yuvrgb.md
Last active April 2, 2025 23:15
RGB <=> YCbCr(YPbPr) color space conversion
Y  = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
BT.601 BT.709 BT.2020
a 0.299 0.2126 0.2627
b 0.587 0.7152 0.6780
@jiristepan
jiristepan / chickenVsEgg.js
Created October 19, 2018 09:26
Chicken egg problem solved by javascript
let question = ['🥚','🐔']
let answer = question.sort()
console.log(answer[0] + ' was first!')
@jhwheeler
jhwheeler / async-foreach.js
Created August 2, 2018 08:16 — forked from atinux/async-foreach.js
JavaScript: async/await with forEach()
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
const asyncForEach = (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50)
@Edwardtonnn
Edwardtonnn / webdev_online_resources.md
Created July 23, 2018 18:17 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active May 11, 2025 21:13
Online Resources For Web Developers (No Downloading)
@Rootzpower
Rootzpower / µTorrent_Disable_Ads.txt
Last active November 2, 2018 15:36
Turn off Ads/Featured Content/Bundle for µTorrent
### Working for 3.5.3 [44396] ###
Turn off Ads/Featured Content/Bundle for µTorrent
Compilation of all settings i find in Internet for disable ads on µTorrent
Options -> Preferences -> Advanced
bt.enable_pulse
distributed_share.enable