Skip to content

Instantly share code, notes, and snippets.

View aflores's full-sized avatar

Armando Flores aflores

View GitHub Profile
@aflores
aflores / gist:4453336b3f352da0aa8b
Created November 4, 2014 00:04
javascript clock
----
In ASP.NET CODE
HttpCookie cookie = Request.Cookies["OldCookieName"];
cookie.Values["CompanyID"] = Convert.ToString(CompanyId);
Response.SetCookie(cookie); //SetCookie is used for update the cookies.
Response.Cookie.Add(cookie); //This is used for Add cookies.
----
In the page where you want to show the clock
@aflores
aflores / gist:9858703
Created March 29, 2014 17:38
Arduino hopscotch
/* Ping))) Sensor
This sketch reads a PING))) ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.
The circuit:
* +V connection of the PING))) attached to +5V
@aflores
aflores / Msg
Created April 15, 2011 16:26
Msg
<div style="width:80%;font-family:arial;padding:10px;background-color:#e2da9b;color:black;font-size:small;text-align:center;border:solid 2px #f00">
This site will be down for scheduled maintenance between:</br></br>
Friday 04/15 9:00 PM and Saturday 04/16 7:00 AM
</div>
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hey!"
message: [NSString stringWithFormat:@" you clicked on '%@'", name]
delegate: nil cancelButtonTitle: @"OK" otherButtonTitles:nil];
[alert show];
[alert release];