Skip to content

Instantly share code, notes, and snippets.

@mihaeu
mihaeu / okcupid-show-all-match-images-tampermonkey.js
Created October 11, 2023 11:39
[Tampermonkey] OkCupid - Show all match images
// ==UserScript==
// @name OkCupid - Show all match images
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Shows all profile images for all your matches, but if you want to find the profiles you still need premium. Look at this like extra motivation.
// @author anonymous
// @match https://www.okcupid.com/who-likes-you
// @icon https://www.google.com/s2/favicons?sz=64&domain=okcupid.com
// @grant none
// ==/UserScript==
set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
" Emulated Plugins
set surround
" set easymotion
set NERDTree
" Copy to system clipboard as well
@mefarazath
mefarazath / GagSsl.java
Last active June 1, 2022 16:07 — forked from chalup/GagSsl.java
Get OkHttpClient which ignores all SSL errors.
private static OkHttpClient getUnsafeOkHttpClient() {
try {
// Create a trust manager that does not validate certificate chains
final TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
@Override
public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
String authType) throws CertificateException {
}
@btimby
btimby / settings.py
Last active August 24, 2021 14:35
Use a Django database router, a TestCase mixin and thread local storage to allow unit tests to switch databases.
# Detect if executed under test
TESTING = any(test in sys.argv for test in (
'test', 'csslint', 'jenkins', 'jslint',
'jtest', 'lettuce', 'pep8', 'pyflakes',
'pylint', 'sloccount',
))
if TESTING:
# If testing, move the default DB to 'mysql' and replace it
# with a SQLite DB.
@krmaxwell
krmaxwell / parsing.py
Created September 20, 2012 15:25
Meta tags and BeautifulSoup
from bs4 import BeautifulSoup
soup = BeautifulSoup(response)
metatags = soup.find_all('meta',attrs={'name':'generator'})
for tag in metatags:
print tag