Skip to content

Instantly share code, notes, and snippets.

@ipatalas
ipatalas / Copy JIRA ID.js
Last active May 1, 2024 21:09
JIRA bookmarklets
let urlParams = new URLSearchParams(location.search);
let fromUrl = /\/browse\/(.*)/.exec(location.pathname);
let jiraId;
if (urlParams.has('selectedIssue')) {
jiraId = urlParams.get('selectedIssue');
} else if (fromUrl) {
jiraId = fromUrl[1];
}
@ipatalas
ipatalas / readme.txt
Created November 28, 2019 12:01
Chrome
Regex to filter out most meaningless requests in the Network tab:
/(?<!\.(css|js|gif|png|ico|ttf|woff2?))$/
@slzdevsnp
slzdevsnp / chrome_readme.md
Last active May 1, 2024 21:08
[chrome] #google #chrome #cloud #software

Restore chrome bookmarks

in Chrome goto Link

Find the for for Profile Path

on OSX the parent folder is ~/Library/Application Support/Google/Chrome/

Find in other profile folders the Bookmarks or Bookmarks.stored copy of your stored bookmarks file

@cou929
cou929 / detect-private-browsing.js
Last active May 1, 2024 21:07
Detect private browsing mode (InPrivate Browsing or Incognito).
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
window.clearInterval(id);
next(is_timeout);
}
if (current_trial++ > max_retry) {
window.clearInterval(id);
@dgp
dgp / detect-private-browsing.js
Created April 12, 2016 12:14 — forked from cou929/detect-private-browsing.js
Detect private browsing mode (InPrivate Browsing or Incognito).
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
window.clearInterval(id);
next(is_timeout);
}
if (current_trial++ > max_retry) {
window.clearInterval(id);
@dgeibi
dgeibi / async.js
Created November 26, 2017 08:26
async promise timer
async function async1() {
console.log('async 1')
await async2()
await async3()
console.log('async 1-1')
}
async function async2() {
console.log('async 2')
}
@johan
johan / jquery.nodoubletapzoom.js
Created March 15, 2012 22:59
A jQuery plugin to selectively disable the iOS double-tap-to-zoom action on specific page elements (and have that generate two click events instead).
// jQuery no-double-tap-zoom plugin
// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy!
(function($) {
var IS_IOS = /iphone|ipad/i.test(navigator.userAgent);
$.fn.nodoubletapzoom = function() {
if (IS_IOS)
$(this).bind('touchstart', function preventZoom(e) {
var t2 = e.timeStamp
content+='<a href= '#' class='pdf_viewer' data-url='+val2.displayUrl+ '>' + val2.displayUrl +'</a>'
Include this line in JS
$('a.pdf_viewer').live('click', function(e){
e.preventDefault();
url = $(e.target).data('url');
window.location = url;
});
@pantor
pantor / nvidia-driver-realtime.sh
Last active May 1, 2024 21:06
Installing NVIDIA drivers on a realtime Linux (PREEMPT-RT)
# Tested on Ubuntu 16.04 and X11, 2019
# 1. Download NVIDIA driver as a .run file
# 2. Stop X-Server
sudo service lightdm stop
# 3. Blacklist Nouveau driver
sudo nano /etc/modprobe.d/blacklist-nouveau.conf