Skip to content

Instantly share code, notes, and snippets.

family = 'wikipedia'
mylang = 'en'
usernames['wikipedia']['en'] = 'JVbot-test'
#!/usr/bin/env python
"""
Print out a report of Wikipedia articles you've visited using your Google Chrome history database.
The output is in Markdown, and you'll need to shutdown Chrome before you run this or else the
database will be locked.
"""
import os
import re
@jayvdb
jayvdb / merge.md
Created August 8, 2014 19:13 — forked from pablitoc/merge.md

If someone forks a gist and you'd like to merge their changes. Do this:

  1. clone your repo, I use the name of the gist

     git clone git://gist.github.com/1163142.git gist-1163142
    
  2. add a remote for the forked gist, I'm using the name of my fellow developer

     git remote add aaron git://gist.github.com/1164196.git
    
# -*- coding: utf-8 -*-
"""
Get a github user's fork of a gist.
Given a starting gist id, traverse the forks to find
a gist for the github username provided in the first
parameter of the command line.
"""
import json
import urllib2
@jayvdb
jayvdb / user-config.py
Created August 8, 2014 20:51
pywikibot-core travis user-config.py
import os
family = os.environ.get('FAMILY', 'wikipedia')
mylang = os.environ.get('LANGUAGE', 'en')
if os.environ.get('TRAVIS_REPO_SLUG', None) == 'wikimedia/pywikibot-core':
usernames[family][mylang] = 'Pywikibot-test'
usernames['wikipedia']['en'] = 'Pywikibot-test'
password_file = os.path.expanduser('~/.pywikibot/passwordfile')
@jayvdb
jayvdb / plsql_frameworks.md
Last active April 2, 2019 05:00
PLSQL frameworks

Every PL/SQL application needs logging and a test framework, and a few other features like assertion, exception and collections.

This is an analsys of the existing frameworks.

APEX logging

APEX has the following debugging packages:

APEX_APPLICATION

@jayvdb
jayvdb / NOTES.txt
Last active March 7, 2018 16:19
Project Euler translations
Current translation websites:
* http://pe-cn.github.io/ - Chinese - Github.io (Markdown + HTML problems) - https://github.com/PE-CN/PE-CN.github.io (mostly by https://github.com/sx349)
* https://marhale3.github.io/ - Persian - Github.io (Markdown + very little HTML) - https://github.com/marhale3/marhale3.github.io (mostly by https://github.com/marhale3)
* http://muratcorlu.com/euler/ - Turkish - Github.io (Markdown + very little HTML) - https://github.com/muratcorlu/euler/tree/gh-pages -- based on the Persian translation
* http://euler.jakumo.org/ - Russian - HTML - https://github.com/jakumo/euler-translates (mostly by https://github.com/stumbler)
* http://projekteuler.de/ - German - Bootstrap
* http://euler.synap.co.kr/ - Korean - PHP
* http://projecteuler.radumurzea.net/ - Romanian - PHP - https://github.com/SoboLAN/projecteuler-ro - downloads problem JSON data from http://projekteuler.de/problems/ - stores English & translation in `sql/data.sql`
* http://odz.sakura.ne.jp/projecteuler/ - Japanese - PukiWiki
@jayvdb
jayvdb / NOTES.txt
Created April 10, 2016 08:12
Other project euler like sites
* http://rosalind.info/
@jayvdb
jayvdb / add_answer.py
Last active June 16, 2016 08:30
Pocket Euler hacks
import sys
def load_answers(answer_filename):
answers = {}
lines = open(answer_filename).readlines()
for line in lines:
problem, answer = line.strip().split(': ')
answers[int(problem)] = answer
return answers