In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| /* Vedant Misra (vedantmisra.com) (github.com/vedant) | |
| * | |
| * Script for exporting Google Keep note files. | |
| * | |
| * This does not handle attachments or checklists, only note files. Downloads | |
| * each note to a .txt file named for the note's title. | |
| * | |
| * To use this, go to https://drive.google.com/keep/ and wait for the page to | |
| * fully load all of your saved notes; scroll to the bottom to confirm they're | |
| * loaded. Then paste the below in your URI bar, go to the start of the line, |
| # -*- encoding: UTF-8 -*- | |
| import os | |
| import httplib2 | |
| # pip install --upgrade google-api-python-client | |
| from oauth2client.file import Storage | |
| from apiclient.discovery import build | |
| from oauth2client.client import OAuth2WebServerFlow |
| -- delete any usermeta specific to the other subsites | |
| delete from wp_usermeta where meta_key regexp '^wp_([0-9]+)_'; | |
| -- duplicate the wp_usermeta structure in a working data table, | |
| -- but add a unique index for filtering out duplicates | |
| create table _fix_usermeta like wp_usermeta; | |
| alter table _fix_usermeta add unique(user_id, meta_key); | |
| -- copy the site-specific usermeta, keeping only the last of each duplicate | |
| insert into _fix_usermeta |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # Modified. | |
| # Original script source: | |
| # http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html | |
| # https://web.archive.org/web/20150312172727/http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html | |
| # Usage: | |
| # Run the script from a folder with file "all.mbox" |
Updated: Just use qutebrowser (and disable javascript). The web is done for.
mboxext is a Mbox mailbox message extractor.
$ python mboxext.py -v /home/vagrant/Sent.mbox /home/vagrant/output/
2015-10-01 17:54:46,060 [mboxext] INFO - Target directory already exists and it's not empty
2015-10-01 17:54:46,061 [mboxext] INFO - Opening Mbox mailbox: /home/vagrant/Sent.mbox
| <?php | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |