Skip to content

Instantly share code, notes, and snippets.

View mcantelon's full-sized avatar

Mike Cantelon mcantelon

View GitHub Profile
@mcantelon
mcantelon / node_setup.sh
Created September 25, 2011 06:49
Node setup
sudo npm install -g deja
sudo npm install -g jshint-runner
sudo npm install -g nmd
@mcantelon
mcantelon / gist:1618064
Created January 15, 2012 23:49
SOPA JS-only blackout
<html>
<head>
<script>
function sopaRedirect() {
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1; //months are zero based
var curr_year = d.getFullYear();
var date = curr_year + "-" + curr_month + "-" + curr_date;
#!/bin/bash
touch /root/part1
./symfony csv:import /root/cva_pr_final_0.csv --rows-until-update=5 --error-log=/root/errors_0.log --source-name=cva
touch /root/part2
./symfony csv:import /root/cva_pr_final_1.csv --rows-until-update=5 --error-log=/root/errors_1.log --source-name=cva
touch /root/part3
./symfony csv:import /root/cva_pr_final_2.csv --rows-until-update=5 --error-log=/root/errors_2.log --source-name=cva
touch /root/part4
./symfony csv:import /root/cva_pr_final_3.csv --rows-until-update=5 --error-log=/root/errors_3.log --source-name=cva
touch /root/part5
<?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') { ?>
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({
/*
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.
@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
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
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:
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