Skip to content

Instantly share code, notes, and snippets.

View rchacon's full-sized avatar
🥑

Raul Chacon rchacon

🥑
  • Syracuse, New York
View GitHub Profile
@rchacon
rchacon / vb-include.sublime-snippet
Created October 23, 2014 14:35
VB: Include File #snippet
<snippet>
<content><![CDATA[
<!-- #include file = "${1:}" -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>include</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.asp</scope>
</snippet>
@rchacon
rchacon / vb-import.sublime-snippet
Created October 22, 2014 15:54
VB: Import Namespace #snippet
<snippet>
<content><![CDATA[
<%@ Import Namespace="${1:}" %>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>imp</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.asp</scope>
</snippet>
@rchacon
rchacon / Web.config
Created August 24, 2014 06:13
IIS Rewrite Rule to redirect /route-name.aspx to /route-name
<rule name="redirect-aspx" enabled="true" stopProcessing="true">
<match url="(.*).aspx$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="http://library.morrisville.edu/{R:1}" appendQueryString="true" />
</rule>
@rchacon
rchacon / Program.cs
Created August 18, 2014 20:55
REST API Example built with ASP.NET MVC 4
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
namespace api_v1_csharp.Models.academics
{
public class Program
{
@rchacon
rchacon / vimeo.html
Last active August 29, 2015 14:02
Using jQuery and vimeo's REST API to fetch a video's description
<div id="video-container"></div>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var vimeoId = 98357626;
// get description of video from vimeo
$.getJSON("http://vimeo.com/api/v2/video/" + vimeoId + ".json", function (videos) {
$("#video-descr").html(videos[0].description);
});