Skip to content

Instantly share code, notes, and snippets.

View amir20's full-sized avatar
🌴
On vacation

Amir Raminfar amir20

🌴
On vacation
View GitHub Profile
@amir20
amir20 / android-pom.xml
Created October 27, 2010 22:22
Pom files for android app with dependency
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Currency: Android Mobile App</name>
<groupId>com.currency.mobile.android</groupId>
<artifactId>android-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
Path path = Paths.get(file.txt);
try (BufferedWriter writer = Files.newBufferedWriter(path, Charset.defaultCharset(), WRITE)) {
writer.write(This is a test);
}
catch(IOException x) {
System.err.format(IOException: %s%n, x);
}
require 'spec_helper'
describe ImportExcelWorkbook do
context 'when exporting to an excel workbook' do
it 'should create the summary worksheet' do
import = build(:import_with_errors)
pp import
end
@amir20
amir20 / package.json
Created February 28, 2012 21:34
A rails proxy written in node.js for testing assets. No need for apache.
{
"name": "rails-proxy",
"version": "0.0.1",
"dependencies": {
"http-proxy": "*",
"node-static": "*"
},
"engines": { "node": ">= 0.4.4" }
}
@amir20
amir20 / to_csv.rb
Created March 15, 2012 01:10
Converts YAML to CSV
#!/usr/bin/ruby
if ARGV.size.zero?
puts %Q[
Usage:
./to_csv.rb file.yml > out.csv
]
exit
end
diff --git a/src/main/java/poscore/service/AssumingSingleUtilityUtilitiesService.java b/src/main/java/poscore/service/AssumingSingleUtilityUtilitiesService.java
index 508cad9..c643e5e 100644
--- a/src/main/java/poscore/service/AssumingSingleUtilityUtilitiesService.java
+++ b/src/main/java/poscore/service/AssumingSingleUtilityUtilitiesService.java
@@ -2,6 +2,7 @@ package poscore.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
diff --git a/report-libs-di/src/main/resources/config/di-dataImport-spring.xml b/report-libs-di/src/main/resources/config/di-dataImport-spring.xml
index baf3624..d659694 100644
--- a/report-libs-di/src/main/resources/config/di-dataImport-spring.xml
+++ b/report-libs-di/src/main/resources/config/di-dataImport-spring.xml
@@ -10,7 +10,11 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"
default-autowire="byName">
- <import resource="classpath:config/berthaClientContext.xml"/>
+ <bean id="berthaClient" class="org.jboss.resteasy.client.spring.RestClientProxyFactoryBean"
@amir20
amir20 / gist:3628114
Created September 4, 2012 23:40
Installing python with brew error verbose
This file has been truncated, but you can view the full file.
19:38:16:~ $ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install
This command requires a formula argument
19:38:17:~ $ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install python
==> Downloading http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/python-2.7.3.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/python-2.7.3.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/python/2.7.3 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/2.7.3/share --datadir=/usr/local/Cellar/python/2.7.3/share --enable-framework=/usr/local/Cellar/python/2.7.3/Frameworks --without-gcc
./configure --prefix=/usr/local/Cellar/python/2.7.3 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/2.7.3/share --datadir=/usr/local/Cellar/python/2.7.3/share --enable-framework=/usr/local/Cellar/python/2.7.3/Frameworks --without-gcc
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
test222