Skip to content

Instantly share code, notes, and snippets.

View slowkow's full-sized avatar
🐄
moooooo

Kamil Slowikowski slowkow

🐄
moooooo
View GitHub Profile
@slowkow
slowkow / download_imex.sh
Created May 16, 2018 19:53
Download all human protein-protein interactions from IMEX.
#!/usr/bin/env bash
#
# See here for more information: https://www.ebi.ac.uk/intact/imex/home.xhtml
# All human protein interactions.
# Query: taxidA:9606 AND taxidB:9606
URL='https://www.ebi.ac.uk/intact/imex/binaryDownload?&serviceURL=http://www.ebi.ac.uk/Tools/webservices/psicquic/imex/webservices/current/search/&query=taxidA:9606%20AND%20taxidB:9606&format=tab27&conversationContext=1'
# This downloads more than 1G of data and compresses it.
curl "$URL" | gzip > imex.txt.gz
@slowkow
slowkow / take-screenshot.scpt
Last active September 29, 2019 01:04
Applescript to take a screenshot with the application title in the filename.
-- take-screenshot.scpt
-- Kamil Slowikowski
-- 2019-09-28
-- Get the title of the frontmost application window.
-- https://stackoverflow.com/questions/5292204
global frontApp, frontAppName, windowTitle
set windowTitle to ""
tell application "System Events"
set frontApp to first application process whose frontmost is true
@slowkow
slowkow / try-showtext.ipynb
Last active May 7, 2018 00:59
Using showtext with Jupyter
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slowkow
slowkow / get_snp_proxies.ipynb
Last active August 9, 2022 00:44
Find SNP proxies in R
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slowkow
slowkow / add-blank-page-to-pdf.sh
Last active April 22, 2018 13:37
Add a blank page to a pdf
#!/usr/bin/env bash
# Count pages in all pdf files in the current directory:
#
# pagecount .
#
# Count pages in this pdf:
#
# pagecount file.pdf
#
@slowkow
slowkow / try-colortools.ipynb
Created April 20, 2018 17:30
Try the colortools R package
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slowkow
slowkow / index.html
Last active November 3, 2024 17:38
Karabiner-Elements mouse4 to back and mouse5 to forward
<html>
<body>
<a href="karabiner://karabiner/assets/complex_modifications/import?url=https%3A%2F%2Fgist.githubusercontent.com%2Fslowkow%2F275e53573e2aeb60c8304add1e54faf5%2Fraw%2Fc63540925dba76f46293834c24700ebf1578ed10%2Fmouse-buttons-back-forward.json">click here to import into Karabiner-Elements</a>
</body>
</html>
@slowkow
slowkow / Apache www-data setup
Last active August 4, 2024 21:21 — forked from milo/github-webhook-handler.php
Github webhook handler in PHP.
sudo mkdir -m 0700 /var/www/.ssh
sudo chown -R www-data:www-data /var/www/.ssh
sudo -u www-data ssh-keygen (empty passphrase)
# On Github, paste public key into "Deploy keys"
sudo -u www-data bash
cd /path/to/repo
git clone ...
@slowkow
slowkow / highcharts-scatter-with-colorbar.html
Last active February 11, 2018 19:16
Highcharts scatter plot with a colorbar
<!-- Put these scripts in the same folder -->
<script src="jquery-1.11.1.min.js"></script>
<script src="highcharts.src.js"></script>
<script src="map.js"></script>
<script src="exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
<script>
$(function () {
@slowkow
slowkow / .block
Last active October 14, 2017 21:15
Barnsley fern
license: mit