Skip to content

Instantly share code, notes, and snippets.

Esfand esfand

Block or report user

Report or block esfand

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@esfand
esfand / File1
Created Mar 19, 2010
This is the description of this Gist. It seems it can only be one line. So, this is in fact the NAME and not a description fo the Gist.
View File1
Embed All Files: <script src="http://gist.github.com/337370.js"></script>
Embed This File: <script src="http://gist.github.com/337370.js?file=gistfile1.txt"></script>
Another test. This time it is a public Gist.
@esfand
esfand / PrintValues
Created Mar 20, 2010
MSBuild Property Demo
View PrintValues
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"
DefaultTargets="PrintValues"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Add>$([MSBuild]::Add(5,9))</Add>
<Subtract01>$([MSBuild]::Subtract(90,768))</Subtract01>
<Mult01>$([MSBuild]::Multiply(4,9))</Mult01>
<Div01>$([MSBuild]::Divide(100,5.2))</Div01>
@esfand
esfand / Sample.proj.xml
Created Mar 20, 2010
MSBuild Target Sample
View Sample.proj.xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This uses a .targets file to offload performing the build -->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'=='' ">Release</Configuration>
<OutputPath Condition=" '$(OutputPath)'=='' ">$(MSBuildProjectDirectory)\BuildArtifacts\bin\</OutputPath>
</PropertyGroup>
View MSBuild Inline Task.proj.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Sample Demonstrates Inline Tasks © 2010 Sayed Ibrahim Hashimi -->
<Project ToolsVersion="4.0"
DefaultTargets="Demo"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask
TaskName="CreateGuid02"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
View MSBuild Inline Task .xml
<!-- Sample Demonstrates Inline Tasks © 2010 Sayed Ibrahim Hashimi -->
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"
DefaultTargets="Demo"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask
TaskName="FilterList"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
View MSBuild Batching 1.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- MSBuild Batching -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<fruit Include="apple">
<consistency>firm</consistency>
</fruit>
<fruit Include="orange">
<consistency>pulpy</consistency>
View gwt json .java
// Json (de)serializer for GWT.
// To work with JSON in GWT:
public class Customer extends JavaScriptObject {
public final native String getFirstName() /*-{
return this.first_name;
}-*/;
public final native void setFirstName(String value) /*-{
this.first_name = value;
}-*/;
View GaeMemcache.java
package com.google.sitebricks.binding;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.servlet.SessionScoped;
import net.jcip.annotations.ThreadSafe;
import javax.servlet.http.HttpSession;
import java.io.Serializable;
View gist:343336
import static org.appfuse.gwt.service.client.rest.RestConstants.*;
import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.Header;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.Response;
/**
View EntryPointTemplte.gwt.java
package com.lingona.rockgwt.front.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
You can’t perform that action at this time.