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/sh | |
| add_dir_link() { | |
| DIR=$1 | |
| cd $HOME | |
| if [ -L $DIR ]; then | |
| echo "Link exists: $DIR" | |
| elif [ -d $DIR ]; then | |
| echo "Dir exists: $DIR" | |
| else |
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
| :javascript | |
| $(function() { | |
| // Helpers for deleting stuff | |
| $( "input.delete" ).click(function(evt) { | |
| return confirm("Är du säker?"); | |
| }); | |
| $( "button.delete" ).click(function(evt) { | |
| return confirm("Är du säker?"); | |
| }); | |
| $( "a.btn-danger" ).click(function(evt) { |
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
| $ irb | |
| 1.9.3-p125 :001 > require 'dm-core' | |
| => true | |
| 1.9.3-p125 :003 > url = "postgres:alarmo?host=localhost&port=4321&user=deploy" | |
| => "postgres:alarmo?host=localhost&port=4321&user=deploy" | |
| 1.9.3-p125 :004 > adapter = DataMapper.setup(:default, url) | |
| NoMethodError: undefined method `to_int' for "4321":String | |
| from /Users/dentarg/.rvm/gems/ruby-1.9.3-p125/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:229:in `normalized_uri' | |
| from /Users/dentarg/.rvm/gems/ruby-1.9.3-p125/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:269:in `initialize' | |
| from /Users/dentarg/.rvm/gems/ruby-1.9.3-p125/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:13:in `new' |
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
| $ pip freeze | |
| PyRSS2Gen==1.0.0 | |
| Twisted==11.0.0 | |
| altgraph==0.7.1 | |
| bdist-mpkg==0.4.4 | |
| bonjour-py==0.3 | |
| cssselect==0.7.1 | |
| include-server==3.1-toolwhip.1 | |
| lxml==2.3.4 | |
| macholib==1.3 |
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
| #!/usr/bin/env ruby | |
| require 'pdf-reader' | |
| infile=ARGV[0] | |
| outfile=ARGV[1] | |
| reader = PDF::Reader.new(infile) | |
| text = "" | |
| reader.pages.each do |page| |
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
| <pdfxml Producer="Acrobat Distiller 8.1.0 (Windows)" Author="SE:W:CAR:MP" Creator="OneForm Designer Plus" Title="2007 Form 1040A" ModDate="D:20080215140604-05'00'" Keywords="Fillable" CreationDate="D:20080215110608-05'00'" Subject="U.S. Individual Income Tax Return"><LTPage rotate="0" pageid="1" height="1043" width="648" bbox="[0, 0, 648, 1043]" y1="1043" y0="0" x0="0" x1="648" page_index="0" page_label="1"><LTTextLineHorizontal word_margin="0.1" height="8.128" width="14.588" bbox="[89.119, 913.467, 103.707, 921.595]" y1="921.595" y0="913.467" x0="89.119" x1="103.707"><LTTextBoxHorizontal index="1" height="8.128" width="14.588" bbox="[89.119, 913.467, 103.707, 921.595]" y1="921.595" y0="913.467" x0="89.119" x1="103.707">Date </LTTextBoxHorizontal></LTTextLineHorizontal><LTTextLineHorizontal word_margin="0.1" height="11.612" width="28.397" bbox="[431.054, 960.806, 459.45, 972.418]" y1="972.418" y0="960.806" x0="431.054" x1="459.45"><LTTextBoxHorizontal index="4" height="11.612" width="28.397" bbox="[431.054, 9 |
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
| $ mkdir /tmp/pdfs | |
| $ pdfseparate | |
| pdfseparate version 0.20.0 | |
| Copyright 2005-2012 The Poppler Developers - http://poppler.freedesktop.org | |
| Copyright 1996-2011 Glyph & Cog, LLC | |
| Usage: pdfseparate [options] <PDF-sourcefile> <PDF-pattern-destfile> | |
| -f <int> : first page to extract | |
| -l <int> : last page to extract | |
| -v : print copyright and version info | |
| -h : print usage information |
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
| def nummer | |
| if @nummer | |
| @nummer | |
| else | |
| @nummer = process_nummer | |
| end | |
| end | |
| def attributes | |
| if @attributes |
This file has been truncated, but you can view the full file.
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
| root@linux:~# cd pdftohtml-0.40a/ | |
| root@linux:~/pdftohtml-0.40a# ls | |
| aconf.h AUTHORS CHANGES CHANGES~ fofi goo Makefile Makefile~ splash src xpdf | |
| root@linux:~/pdftohtml-0.40a# make | |
| cd goo; make | |
| make[1]: Entering directory `/root/pdftohtml-0.40a/goo' | |
| g++ -O2 -DHAVE_CONFIG_H -I.. -I. -c GHash.cc | |
| g++ -O2 -DHAVE_CONFIG_H -I.. -I. -c GList.cc | |
| g++ -O2 -DHAVE_CONFIG_H -I.. -I. -c GString.cc | |
| g++ -O2 -DHAVE_CONFIG_H -I.. -I. -c gmempp.cc |
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 StringExtension | |
| def self.formattera_summa(summa) | |
| tusenavskiljare = " " | |
| decimalseparator = "," | |
| summa = "%.2f" % summa | |
| # From ActionPack ActionView::Helpers::NumberHelper.number_with_delimiter | |
| parts = summa.split('.') | |
| parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{tusenavskiljare}") | |
| parts.join(decimalseparator) | |
| end |