This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Licensed to Jasig under one or more contributor license | |
agreements. See the NOTICE file distributed with this work | |
for additional information regarding copyright ownership. | |
Jasig licenses this file to you under the Apache License, | |
Version 2.0 (the "License"); you may not use this file | |
except in compliance with the License. You may obtain a | |
copy of the License at the following location: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved | |
" this little dance it to get a 0 exit code for git commit | |
filetype plugin indent on | |
filetype plugin indent off | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Riak | |
class MapReduce | |
def self.bucket_name | |
'super_awesome_bucket' | |
end | |
def self.get_keys | |
# TODO get the keys to process by querying an index or listing all keys in a bucket | |
[] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
riak_ping() { | |
NODES=$(dig +short A production-reporting-source-129485720.us-east-1.elb.amazonaws.com) | |
for n in $NODES; do | |
echo "Server ${n}: $(curl --connect-timeout 3 -s -k https://${n}:8080/ping)" & | |
done | |
} | |
alias riak_ping=riak_ping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% start with this | |
map_reindex({error,notfound}, _, _) -> | |
[]; | |
map_reindex(RiakObject, _, _) -> | |
riak_search_kv_hook:precommit(RiakObject), | |
[]. | |
% and convert to this | |
fun({error,notfound}, _, _) -> | |
[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_branch { | |
git rev-parse --git-dir &> /dev/null | |
git_status="$(git status 2> /dev/null)" | |
branch_pattern="^On branch ([^${IFS}]*)" | |
remote_pattern="# Your branch is ([[:alnum:]]*)" | |
diverge_pattern="# Your branch and (.*) have diverged" | |
if [[ ${git_status} =~ ${branch_pattern} ]]; then | |
branch=${BASH_REMATCH[1]} | |
if [[ ${git_status} =~ "Changes not staged for commit" ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install ffmpeg youtube-dl | |
$ sudo install youtube2mp3 /usr/local/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################### | |
# Pax Runner profile for Sakai OAE 1.4.0-SNAPSHOT using Apache Felix Http | |
######################################################################### | |
# | |
##### Dependencies | |
# | |
# start level 1 | |
scan-bundle:mvn:commons-io/commons-io/1.4@1 | |
scan-bundle:mvn:commons-fileupload/commons-fileupload/1.2.2@1 | |
scan-bundle:mvn:commons-collections/commons-collections/3.2.1@1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private javax.jcr.Session jcrSession; | |
private org.sakaiproject.nakamura.api.lite.Repository repository; | |
private org.sakaiproject.nakamura.api.lite.Session session; | |
// Create an in-memory repository to work with | |
repository = new BaseMemoryRepository().getRepository(); | |
// mock a jcr session but also include SessionAdaptable for easier mocking to a sparse session | |
jcrSession = mock(javax.jcr.Session.class, Mockito.withSettings().extraInterfaces(SessionAdaptable.class)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
?> | |
<div id="branding" class="clearfix"> | |
<?php print $breadcrumb; ?> | |
<?php print render($title_prefix); ?> | |
<?php if ($title): ?> | |
<h1 class="page-title"><?php print $title; ?></h1> | |
<?php endif; ?> | |
<?php print render($title_suffix); ?> |