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
%w[bcms_my401k_articles bcms_my401k_article_versions].each do |t| | |
ActiveRecord::Base.connection.execute("truncate table #{t}") | |
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
# download html summaries | |
# paste in html reference to stockphoto summary page | |
# use wget to download a static page | |
wget http://www.shutterstock.com/pic-12539920/stock-photo-pretty-young-woman-with-arms-raised-standing-on-beach.html?src=1pUEJjjRjtTVA1C8FaQDfw-2-41 | |
wget http://www.shutterstock.com/pic.mhtml?id=97713707 | |
wget http://www.shutterstock.com/pic.mhtml?id=123208630 | |
wget http://www.shutterstock.com/pic.mhtml?id=111719192 | |
wget http://www.shutterstock.com/pic.mhtml?id=59363377 | |
wget http://www.shutterstock.com/pic.mhtml?id=53308978 |
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
var cms_namespace = "<%= link_to("xxx", block_path(@block)).match(/href=\"\/([^\/]+)/)[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
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> | |
<display-name>UCPath-WS</display-name> | |
<welcome-file-list> | |
<welcome-file>index.html</welcome-file> | |
<welcome-file>index.htm</welcome-file> | |
<welcome-file>index.jsp</welcome-file> | |
<welcome-file>default.html</welcome-file> | |
<welcome-file>default.htm</welcome-file> |
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
import org.apache.cxf.Bus; | |
import org.apache.cxf.BusFactory; | |
import org.apache.cxf.bus.spring.SpringBusFactory; | |
public final class UCIDMServicesClient { | |
private UCIDMServicesClient() { | |
} | |
public static void main(String args[]) throws java.lang.Exception { |
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 the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF 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 | |
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
class CreateBcmsMy401kWidgets < ActiveRecord::Migration | |
def self.up | |
Cms::ContentType.create!(:name => "BcmsMy401k::Widget", :group_name => "BcmsMy401k::Widget") | |
create_content_table :bcms_my401k_widgets, :prefix=>false do |t| | |
t.integer :user_id | |
t.string :name | |
t.text :description | |
t.timestamps | |
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
" ************* basic conversion script ****************** | |
" the '/e' regexp flag in vim allows subsequent regexp to be | |
" run even if the current regexp doesn't have any hits | |
function! JournalBasicConversion(...) | |
" isolate each code block and surround with <pre... | |
:%s/^}}/ç/g | |
:%s/\n{{\(\([\r\n]\+[^ç]\+.*\)\+\)\nç/\r<pre class=\"code\">\1\r<\/pre>/eg | |
" create titles | |
:%s/^==\+ \(.\+\)$/<h4>\1<\/h4>/eg |
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
base_dst_path="/Volumes/Extra/dave/downloads" | |
for file in \ | |
BW-1161.exe milkallergy-companion-and-cookbook.pdf iPhoneConfigUtility.dmg Screenhero.zip iPhotoLibraryUpgrader.dmg join.me.zip | |
do | |
#mv $file $base_dst_path | |
ln -s $base_dst_path/$file | |
#echo -e "# file was moved on "$(date +"%Y-%m-%d %H:%M:%S")"\nopen \"$base_dst_path/$file\"" > $file.txt | |
done |
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
# Usage example: | |
# | |
# log_filename = File.join(log_path, "#{Sinatra::Base.environment.to_s}.log") | |
# $log_file = File.open(log_filename, 'a+') | |
# | |
# STDOUT.sync = true if 'yes' == ENV['API_DEBUG'] | |
# $log_file.sync = true if 'yes' == ENV['API_DEBUG'] | |
# | |
# require 'logger' | |
# $logger = Logger.new MultiIO.new(STDOUT, $log_file) |