Skip to content

Instantly share code, notes, and snippets.

View ryanatwork's full-sized avatar

Ryan Resella ryanatwork

View GitHub Profile
@ryanatwork
ryanatwork / find.asp
Created April 12, 2011 21:34
Test file
<%
strPerson = "Not Available"
If request.cookies("LoginUser") <> "" Then
strPerson = request.cookies("LoginUser")
ElseIf request.cookies("User") <> "" Then
strPerson = request.cookies("User")
ElseIf Request.Cookies("Register")("FirstName") <> "" AND Request.Cookies("Register")("LastName") Then
strPerson = Request.Cookies("Register")("FirstName") & " " & Request.Cookies("Register")("LastName")
End If
@ryanatwork
ryanatwork / APItest.html
Created May 26, 2011 18:07
ArcGIS Javasscript API
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Create a Map</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.3/js/dojo/dijit/themes/claro/claro.css">
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.3"></script>
<script type="text/javascript">
dojo.require("esri.map");
We couldn’t find that file to show.
@ryanatwork
ryanatwork / browse.asp
Created August 24, 2011 05:45
Browse SQL Server Jobs
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim strConn
strConn = "YOUR CONNECTION STRING HERE"
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open(strConn)
@ryanatwork
ryanatwork / Newfile.cs
Created August 24, 2011 20:58
ParseDates
protected string ParseDate(DateTime startDate, DateTime endDate)
{
string temp;
//Don't show times if 12:00 AM
bool showStartTime = false;
bool showEndTime = false;
if (DateTime.Parse(startDate.ToShortTimeString()) != DateTime.Parse("12:00 AM"))
{
showStartTime = true;
if (DateTime.Parse(endDate.ToShortTimeString()) != DateTime.Parse("12:00 AM"))
@ryanatwork
ryanatwork / closest.ruby
Created September 28, 2011 04:19
Closest one
require 'sinatra'
require 'json'
require 'net/http'
require 'haml'
require 'geocoder'
get '/' do
b = JSON.parse(Net::HTTP.get(URI.parse("http://data.cityofchicago.org/api/views/nen3-vcxj/rows.json")))
us = [41.864447,-87.644806]
@ryanatwork
ryanatwork / wattupdog.js
Created October 18, 2011 21:35
Wattup dog
say("Hello....", {voice:"simon"});
say("......");
say("yes.....", {voice:"simon"});
say("......");
say("this is dog", {voice:"simon"});
@ryanatwork
ryanatwork / _nav.html.haml
Created January 22, 2012 03:21
Bootstrap Menu in HAML
.topbar-wrapper{:style => "z-index: 5;"}
.topbar{"data-dropdown" => "dropdown"}
.topbar-inner
.container
%h3
= link_to 'Project', root_path
%ul.nav
%li
= link_to 'Home', '#', {:class => 'active'}
%li
@ryanatwork
ryanatwork / Brigade.rb
Created May 2, 2012 19:06
Admin for Brigade
a = User.find_by_email('kevin@codeforamerica.org')
a.admin = true
a.save
@ryanatwork
ryanatwork / gist:2880008
Created June 6, 2012 04:54
Rails Admin Error on Heroku
2012-06-06T04:52:28+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 35015`
2012-06-06T04:52:47+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-06-06T04:52:47+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at