Skip to content

Instantly share code, notes, and snippets.

View lindenb's full-sized avatar
😶
I hate people.

Pierre Lindenbaum lindenb

😶
I hate people.
View GitHub Profile
@LoranKloeze
LoranKloeze / scroll_instagram.js
Created May 31, 2017 20:13
Automatic scroll of Instagram page, stop scrolling by hand...
/*
Tired of scrolling to one of the last photos on the page on Instagram? Let your
browser do the scrolling for you!
31-05-2017
(c) 2017 - Loran Kloeze - loran@ralon.nl
Usage
- Go to https://www.instagram.com/instagram_handle/ (change instagram_handle in i.e. taylorswift)
- Open up the console (F12) (Firefox users: type 'allow pasting' if you haven't done so yet)
- Select the contents of this complete file and copy/paste it to the console and hit enter
@sujaikumar
sujaikumar / 2015-11-30-blastp-bug.md
Last active November 2, 2023 04:46
NCBI blastp bug - changing max_target_seqs returns incorrect top hits

NCBI blastp seems to have a bug where it reports different top hits when -max_target_seqs is changed. This is a serious problem because the first 20 hits (for example) should be the same whether -max_target_seqs 100 or -max_target_seqs 500 is used.

The bug is reproducible on the command line when searching NCBI's nr blast database (dated 25-Nov-2015) using NCBI 2.2.28+, 2.2.30+ and 2.2.31+.

At first I thought it was something to do with my local exe/blastdb, but the same problem is also apparent on the NCBI blastp web interface (as of 30-Nov-2015)

@lindenb
lindenb / README.md
Last active June 16, 2016 10:44
git : commit + rebase + squash on github ; synching with upstream
@peteroupc
peteroupc / LineReader.js
Last active November 22, 2022 04:05
JavaScript class for reading files line by line in HTML5 apps
/*
Written by Peter O.
Any copyright to this work is released to the Public Domain.
In case this is not possible, this work is also
licensed under Creative Commons Zero (CC0):
https://creativecommons.org/publicdomain/zero/1.0/
*/
@developius
developius / README.md
Last active February 29, 2024 20:24
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@harawata
harawata / ColumnAliasDirective.java
Created March 15, 2014 17:34
A custom Velocity directive for MyBatis to generate column aliases. Related to https://github.com/mybatis/mybatis-3/pull/136
/*
* Copyright 2014 MyBatis.org.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
#!/usr/bin/env sh
#$ extract_cookies $HOME/.mozilla/firefox/*/cookies.sqlite > /tmp/cookies.txt
#$ wget --load-cookies=/tmp/cookies.txt http://mysite.com
#$ # OR
#$ curl --cookie /tmp/cookies.txt http://mysite.com
cleanup() {
rm -f $TMPFILE
exit 1
}
@richardcornish
richardcornish / git.md
Last active August 11, 2023 08:44
Enough Git for your résumé in 100ish lines
@imkevinxu
imkevinxu / .gitconfig
Created November 5, 2012 09:42
`git random` alias that will commit a random commit message from http://whatthecommit.com/
[alias]
random = !"git add -A; git commit -am \"$(echo $(curl -s http://whatthecommit.com/index.txt)\" (http://whatthecommit.com)\")\"; git pull --rebase; git push"
@chitan
chitan / WsChatServlet.java
Created July 7, 2012 01:44
How to use WebSocket of Tomcat
//This sample is how to use websocket of Tomcat.
package wsapp;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.util.ArrayList;
import org.apache.catalina.websocket.MessageInbound;
import org.apache.catalina.websocket.StreamInbound;
import org.apache.catalina.websocket.WebSocketServlet;