Skip to content

Instantly share code, notes, and snippets.

View mcantelon's full-sized avatar

Mike Cantelon mcantelon

View GitHub Profile
@mcantelon
mcantelon / elasticSearchIndexProcessAIP.py
Created August 24, 2012 21:14
elasticSearchIndexProcessAIP.py
#!/usr/bin/python -OO
# This file is part of Archivematica.
#
# Copyright 2010-2011 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
mapping = {
"_default_" : {
"type": "string"
}
}
conn.put_mapping("aip", {"_all" : {"enabled" : True}, "properties": mapping}, ["aips"])
cd ~/delete_index
python del.py
cd ~
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.8.tar.gz
tar zxvf elasticsearch-0.19.8.tar.gz
cd elasticsearch-0.19.8
bin/elasticsearch
JavaScript for copy is:
media/js/transfer/component_form.js (line 46)
Server-side code is:
main/filesystem.py (line 105)
Code that does actual copying:
if os.path.isdir(entry_path):
destination_dir = os.path.join(transfer_dir, entry)
try:
demo@archivematicaDev:~/archivematica$ svn diff
Index: src/dashboard/src/settings_local.py.tmpl
===================================================================
--- src/dashboard/src/settings_local.py.tmpl (revision 2945)
+++ src/dashboard/src/settings_local.py.tmpl (working copy)
@@ -1,7 +1,7 @@
LOCAL_SETTINGS = True
from settings import *
-DEBUG = False
@mcantelon
mcantelon / gist:3118117
Created July 15, 2012 18:45
Notes of DARPA panel
Hope 9 panel: DARPA Funding for Hackers: A Good Thing? (July 15, 2012, 14:00)
Tweet me at @mcantelon if anything in these notes is wrong. These notes are paraphrased, not verbatim.
Don't flame people based on these notes. ;)
Pics from panel: http://imgur.com/a/DOK3S
-Mitch Altman moderating: not participating in Maker Faire this year because MAKE received a DARPA award
for education (https://plus.google.com/102168405388745526392/posts/8Kg6dMUrX6x)
-Panel includes Mitch Altman, Psytek, Willow Brugh, Matt Joyce, Flacre O'Duinn
/*
this file is part of archivematica.
Copyright 2010-2012 Artefactual Systems Inc. <http://artefactual.com>
archivematica is free software: you can redistribute it and/or modify
it under the terms of the gnu general public license as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
from pyes import *
conn = ES('127.0.0.1:9200')
index_name = 'test4'
document_type = 'thing'
#conn.delete_index(index_name)
conn.create_index(index_name)
conn.index({
<?php if ($sf_context->getActionName() == 'index') { ?>
<div style='float:right'>
<span class='st_sharethis_large' displayText='ShareThis'></span>
<span class='st_facebook_large' displayText='Facebook'></span>
<span class='st_twitter_large' displayText='Tweet'></span>
<span class='st_linkedin_large' displayText='LinkedIn'></span>
<span class='st_email_large' displayText='Email'></span>
</div>
<?php }
if ($sf_context->getActionName() == 'index') { ?>