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
# Convert text files in cp1252 with dos line endings to files in UTF-8 with | |
# Unix line endings | |
for file (*.txt) {iconv -f cp1252 -t utf-8 $file -o $file} | |
dos2unix *.txt |
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
#!/usr/bin/env bash | |
set -e | |
VER=$1 | |
ZIP="wordpress-$VER.zip" | |
URL="https://wordpress.org/$ZIP" | |
echo "Trying to upgrade to WordPress $VER" | |
echo "Downloading $URL" |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import time | |
import _thread | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(11, GPIO.OUT) |
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
javascript:(function() {window.location=window.location.toString().replace(/(.org|.com)/,"$1.resources.library.brandeis.edu");})() |
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
SELECT `text`, COUNT(`text`) | |
FROM `omeka_element_texts` | |
WHERE `element_id` = 37 | |
GROUP BY `text` |
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
nnoremap <leader>bg :call ToggleBackground()<cr> | |
function! ToggleBackground() | |
if &background == "dark" | |
set background=light | |
else | |
set background=dark | |
endif | |
endfunction |
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
" Find related Pandoc footnote numbers | |
" ------------------------------------------------------------------- | |
" Vim's * key searches for the next instance of the word under the | |
" cursor; Vim decides what counts as the boundary of a word with the | |
" iskeyword option. This function toggles the special characters of a | |
" Pandoc footnote in the form [^1] to allow you to jump between | |
" footnotes with the * key. | |
nnoremap _fn :call ToggleFootnoteJumping()<CR> | |
function! ToggleFootnoteJumping() | |
if exists("g:FootnoteJumping") |
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
SELECT TEXT, COUNT( * ) | |
FROM omeka_element_texts | |
WHERE element_id = '37' | |
GROUP BY TEXT |
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
desc "There is no default task" | |
task :default do | |
puts "There is no default task. Try one of these:" | |
sh "rake --tasks" | |
end | |
desc "Setup Omeka" | |
task :setup_omeka => [:omeka_download, "omeka-dev", :omeka_copy_files, :omeka_install_official_plugins, :omeka_link_dev_theme, :omeka_link_dev_plugins] do | |
puts "Omeka is setup." | |
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
#!/usr/bin/env ruby | |
print (9585+rand(0..1)).chr(Encoding::UTF_8) while true |