This file contains hidden or 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
| #!/bin/bash | |
| BACKUP="/tmp/s3/db" | |
| DATE=`date +"%Y-%m-%d"` | |
| DIR="${BACKUP}/${DATE}/" | |
| if [ ! -d $DIR ]; | |
| then | |
| mkdir -p $DIR | |
| fi |
This file contains hidden or 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
| RunLoop.prototype = { | |
| /** | |
| @method end | |
| */ | |
| end: function() { | |
| this.flush(); | |
| }, | |
| // … |
This file contains hidden or 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
| curl https://codeload.github.com/postmodern/chruby/tar.gz/v0.3.4 -o chruby-0.3.4.tar.gz | |
| tar -xzvf chruby-0.3.4.tar.gz | |
| cd chruby-0.3.4 | |
| mkdir /tmp/chruby-install | |
| PREFIX=/tmp/chruby-install make install | |
| fpm --prefix /usr/local -a all -s dir -t deb -p chruby-VERSION_ARCH.deb -n chruby -v 0.3.4 -C /tmp/chruby-install bin share | |
| rm -rf /tmp/chruby-install |
This file contains hidden or 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
| require 'dm-core' | |
| DataMapper::Model.append_inclusions(ActiveModel::SerializerSupport) | |
| DataMapper::Collection.send(:include, ActiveModel::ArraySerializerSupport) |
This file contains hidden or 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
| for i in `ls *.svg` | |
| rsvg-convert -f pdf -o PDF/${i}.pdf $i |
This file contains hidden or 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
| require 'net/imap' | |
| # snippet | |
| @imap = Net::IMAP.new('imap.gmail.com', :port => 993, :ssl => true) | |
| @imap.login('username@gmail.com', 'password') | |
| @imap.select('INBOX') | |
| idler = Thread.start { | |
| @imap.idle {|response| puts response} |
This file contains hidden or 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 ThumbnailIO < StringIO | |
| def initialize(*args) | |
| super(*args[1..-1]) | |
| @name = args[0] | |
| end | |
| def original_filename | |
| @name | |
| end | |
| end |
This file contains hidden or 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
| searchable do | |
| text :id | |
| text :content | |
| text :caller | |
| text(:username) {(assigned_user || user).name} | |
| text(:customer_number) {customer.customer_number} | |
| text(:customer_name) {customer.name} | |
| text(:customer_address) {[customer.address, customer.city, customer.state, customer.zip]} | |
| time :created_at | |
| end |
This file contains hidden or 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
| <fieldType name="text" class="solr.TextField" omitNorms="false"> | |
| <analyzer type="query"> | |
| <tokenizer class="solr.StandardTokenizerFactory"/> | |
| <filter class="solr.StandardFilterFactory"/> | |
| <filter class="solr.LowerCaseFilterFactory"/> | |
| <filter class="solr.PorterStemFilterFactory"/> | |
| </analyzer> | |
| <analyzer type="index"> | |
| <tokenizer class="solr.StandardTokenizerFactory"/> | |
| <filter class="solr.StandardFilterFactory"/> |
This file contains hidden or 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
| <script type="text/x-handlebars" data-template-name="application"> | |
| <div class="column column-1"> | |
| {{view Docket.ProblemsStatsView}} | |
| <%# render 'sidebar' %> | |
| </div> | |
| <div class="column column-2" id="problems-container"> | |
| {{view Docket.ProblemsIndexView}} | |
| <%# render 'problems', :problems => @problems %> | |
| </div> |