Skip to content

Instantly share code, notes, and snippets.

View janxkoci's full-sized avatar

Jeňa Kočí janxkoci

View GitHub Profile
@cvoltz
cvoltz / dropbox.patch
Created August 9, 2019 14:54
Patch to dropbox.py to get the correct PID when running Dropbox via flatpak
--- dropbox.py
+++ dropbox.py
@@ -134,11 +134,12 @@
FatalVisibleError("Platform not supported")
def is_dropbox_running():
- pidfile = os.path.expanduser("~/.dropbox/dropbox.pid")
-
try:
- with open(pidfile, "r") as f:
@sephraim
sephraim / import_vcf_into_df.R
Created March 28, 2017 22:02
Import VCF file into data frame in R
library(vcfR)
# Import VCF
my.vcf <- read.vcfR('my.vcf.gz')
# Combine CHROM thru FILTER cols + INFO cols
my.vcf.df <- cbind(as.data.frame(getFIX(my.vcf)), INFO2df(my.vcf))
@rpavlik
rpavlik / PushBulletBookmarklet.js
Last active October 30, 2020 16:41 — forked from Ashish879/PushBulletBookmarklet.js
PushBullet Bookmarklet
(function() {
var API_KEY = "YOUR_API_KEY_GOES_HERE";
// code for IE7+, Firefox, Chrome, Opera, Safari - forget IE6
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", "https://api.pushbullet.com/v2/pushes", true);
xmlhttp.setRequestHeader('Content-Type', 'application/json');
xmlhttp.setRequestHeader('Authorization', "Bearer " + API_KEY);
/// @todo needs oauth2 update? ugh.
@s-leroux
s-leroux / pgist.sh
Created June 24, 2016 09:46
Post GIST
# 0. Your file name
FNAME=some.file
# 1. Somehow sanitize the file content
# Remove \r (from Windows end-of-lines),
# Replace tabs by \t
# Replace " by \"
# Replace EOL by \n
CONTENT=$(sed -e 's/\r//' -e's/\t/\\t/g' -e 's/"/\\"/g' "${FNAME}" | awk '{ printf($0 "\\n") }')
@Ashish879
Ashish879 / PushBulletBookmarklet.js
Last active November 12, 2018 14:07
PushBullet Bookmarklet
/***********************************************
* If you don't have any proxy restrictions calling PushBullet directly is the recommended approach.
* To use this script replace the "<INSERT_API_KEY_HERE>" section with your API KEY
* A bookmarklet is created like a regular bookmark. The below javascript code goes in the URL area.
************************************************/
javascript:(function()%7Bfunction%20callback()%7B(function(%24)%7Bvar%20jQuery%3D%24%3Bvar%20API_KEY%20%3D%20%22<INSERT_API_KEY_HERE>%22%3Bvar%20newPush%20%3D%20%7B%7D%3BnewPush%5B%22type%22%5D%20%3D%20%22link%22%3B%20newPush%5B%22title%22%5D%20%3D%20document.title%3BnewPush%5B%22url%22%5D%20%3D%20document.URL%3B%24.ajax(%7Btype%3A%20%22POST%22%2Cheaders%3A%20%7B%22Authorization%22%3A%20%22Bearer%20%22%20%2B%20API_KEY%7D%2Curl%3A%20%22https%3A%2F%2Fapi.pushbullet.com%2Fv2%2Fpushes%22%2Cdata%3A%20newPush%7D)%7D)(jQuery.noConflict(true))%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fajax.googleapis.com
@davfre
davfre / bamfilter_oneliners.md
Last active February 24, 2024 01:23
SAM and BAM filtering oneliners
@rxaviers
rxaviers / gist:7360908
Last active May 1, 2024 19:56
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@rotten77
rotten77 / google-keep-bookmarklet.js
Created May 3, 2013 06:57
Google Keep Bookmarklet
javascript:void(function(){var w = 430; var h = 600; var t = (screen.height ? (screen.height - h) / 4 : 0); var l = (screen.width ? (screen.width - w) / 2 : 0); var win = window.open('https://drive.google.com/keep/','google-keep','width='+w+',height='+h+',top='+t+',left='+l+',location=no,personalbar=no,menubar=no,status=no,resizable=yes,scrollbars=yes');})();
@codewzrd
codewzrd / evernote.js
Created October 17, 2008 12:29
Evernote bookmarklet
CmdUtils.makeBookmarkletCommand({
name: "Evernote",
description: "Save a note on Evernote.",
icon: "http://www.evernote.com/favicon.ico",
homepage: "http://www.makadia.com",
author: {name: "Svapan Makadia", email: "codewzrd@hotmail.com"},
help: "Select content and invoke this command to save the selection as a note or just save the whole page without selecting anything.",
url: "javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var%20x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new%20Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"
})