Skip to content

Instantly share code, notes, and snippets.

Avatar

Jaime Jaramillo jjaramillo

  • Globant
  • Bogotá, Colombia
View GitHub Profile
@jjaramillo
jjaramillo / gist:2354525
Created Apr 10, 2012
Deserialize an aspnet serialized (json) datetime
View gist:2354525
Date(parseInt(/\/Date\((\d+).*/.exec(currentHoliday.DateTime)[1]));
@jjaramillo
jjaramillo / gist:2353948
Created Apr 10, 2012
Weird Date behaviour on chrome
View gist:2353948
currentHoliday.DateTime
"2012-04-06T00:00:00"
new Date(currentHoliday.DateTime)
Thu Apr 05 2012 19:00:00 GMT-0500 (SA Pacific Standard Time)
@jjaramillo
jjaramillo / gist:1859714
Created Feb 18, 2012
ruby from brew...
View gist:1859714
Kimiko:/ jjaramillo$ brew install ruby
==> Installing ruby dependency: readline
sh: 1: Permission denied
sh: 1: Permission denied
==> Downloading http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz
######################################################################## 100.0%
==> Downloading patches
######################################################################## 100.0%
######################################################################## 100.0%
==> Patching
@jjaramillo
jjaramillo / gist:1859676
Created Feb 18, 2012
trying to install ruby 1.9.3 from rvm...
View gist:1859676
imiko:/ jjaramillo$ rvm install 1.9.3-p0
Fetching yaml-0.1.4.tar.gz to /Users/jjaramillo/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/jjaramillo/.rvm/src
Configuring yaml in /Users/jjaramillo/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/jjaramillo/.rvm/usr" ', please read /Users/jjaramillo/.rvm/log/ruby-1.9.3-p0/yaml/configure.log
Compiling yaml in /Users/jjaramillo/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/jjaramillo/.rvm/log/ruby-1.9.3-p0/yaml/make.log
Database file /Users/jjaramillo/.rvm/config/packages does not exist.
@jjaramillo
jjaramillo / gist:1859669
Created Feb 18, 2012
trying to install git on lion...
View gist:1859669
==> make prefix=/usr/local/Cellar/git/1.7.9.1 CC=/Applications/Xcode.app/Content
GIT_VERSION = 1.7.9.1
* new build flags or prefix
* new link flags
./generate-cmdlist.sh > common-cmds.h+ && mv common-cmds.h+ common-cmds.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -o hex.o -c -MF ./.depend/hex.o.d -MMD -MP -Os -w -pipe -march=native -I. -DUSE_ST_TIMESPEC -DNO_GETTEXT -DHAVE_DEV_TTY -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM hex.c
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -o ident.o -c -MF ./.depend/ident.o.d -MMD -MP -Os -w -pipe -march=native -I. -DUSE_ST_TIMESPEC -DNO_GETTEXT -DHAVE_DEV_TTY -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM ident.c
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -o kwset.o -c -MF ./.depend/kwset.o.d -MMD -MP -Os -w -pipe -march=native -I. -DUSE_ST_TIMESPEC -DNO_GETTEXT -DHAVE_DEV_TTY -DSHA1_HEADER='<openssl/sha.h>' -D
@jjaramillo
jjaramillo / DropDownBind.cs
Created Dec 23, 2011
Ejemplo de como hacer un bind en un dropdown de aspnet
View DropDownBind.cs
try
{
ObjectQuery<Sistemas_constructivos> sistconsCOM = ObservatorioBD.Sistemas_constructivos;
var Query = from Sistemas_constructivos in ObservatorioBD.Sistemas_constructivos select Sistemas_constructivos;
dlsistemaconstructivo.DataSource = Query.ToArray(); //ToList() tambien funciona
dlsistemaconstructivo.DataTextField = "Nombre"; //Aca va el nombre de la propiedad del objeto que viene en la colección que vas a mostrar en el combo
dlsistemaconstructivo.DataValueField = "Id"; //Aca va el nombre de la propiedad del objeto que viene en la colección que va a ser el value, y que debería de ser único (usualmente es la llave primaria)
dlsistemaconstructivo.DataBind(); //Haces el bind
//dlsistemaconstructivo.SelectedValue = Convert.ToString(result.Id); //esto realmente se usa es para seleccionar uno de los
//elementos del dropwdown, es decir si el dropdown es de paises, y necesitas que colombia aparezca seleccionado, y sabes que el id de colombia es 15,
@jjaramillo
jjaramillo / SPConnection.cs
Created Dec 23, 2011
A file to open connections to a sharepoint site from a desktop application. This is intended to run on the application server.
View SPConnection.cs
using System;
using System.Text;
using System.Web;
using Microsoft.SharePoint;
public class SPConnection
{
private SPSite _site;
private SPWeb _web;
private string _siteUrl;
@jjaramillo
jjaramillo / gist:1497773
Created Dec 19, 2011
Powershell commands in order to fully deploy a feature. (This case a job) in sharepoint 2010
View gist:1497773
Add-SPSolution "c:\Paradigma.GrupoMundial.Innovacion.JobInstall.wsp"
Install-SPSolution -Identity "Paradigma.GrupoMundial.Innovacion.JobInstall.wsp" -GACDeployment
Enable-SPFeature -Identity "Paradigma.GrupoMundial.Innovacion.JobInstall_Feature1" -Url "http://localhost:10963"
@jjaramillo
jjaramillo / sharepointlog.txt
Created Dec 16, 2011
Sharepoint's Workflow Engine exception.
View sharepointlog.txt
RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line="0" Column="10" Text="The type or namespace name 'iLoveSharePoint' could not be found (are you missing a using directive or an assembly reference?)" /></Error> at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(String assmNameIn, SPWeb web) at Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(Guid trackingId, SPWorkflow workflow) at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut) at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)
Microsoft.SharePoint.SPException: <Error><CompilerError Line="0" Column="10" Text="The type or namespace name 'iLoveSharePoint' could not be found (are you missing a using directive or an assembly reference?)" /></Error> at Mic
@jjaramillo
jjaramillo / Cursed error from hell.txt
Created Dec 15, 2011
Sharepoint's god damn exception messages
View Cursed error from hell.txt
Possible mismatch between the reported error with code = 0x81070504 and message: "There is no Web named "/ServiciosEmpleados/PersonalMencion/Forms/AllItems.aspx"." and the returned error with code 0x80070002.