Skip to content

Instantly share code, notes, and snippets.

Daryl Fritz darylf

Block or report user

Report or block darylf

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
@darylf
darylf / devtools.responsiveUI.presets.json
Created Feb 12, 2017
Firefox responsive design view breakpoints
View devtools.responsiveUI.presets.json
[
{
"key": "800x1280",
"name": "Amazon Kindle Fire HD 8.9",
"width": 800,
"height": 1280
},
{
"key": "480x800",
"name": "Amazon Kindle Fire HD 7",
@darylf
darylf / disapproval.html
Last active Aug 29, 2015
Unicode can be used as valid HTML ID's and Classes.
View disapproval.html
<!doctype html>
<head>
<title>Disapproval</title>
<style>
#ಠ_ಠ { }
.❤ { }
</style>
</head>
<body>
View gist:e0a9850b12d7d11cfe34
TextBox1.Visible = ShowTextBox ? true : false;
View refactorme.cs
// Refactor the below code.
try
{
abc = !String.IsNullOrEmpty(wsResponse.Webservice.AbcValue) ? Convert.ToInt32(wsResponse.Webservice.AbcValue) : 0;
}
catch (Exception ex)
{
//throw it out and it will be handled by the caller
throw ex;
@darylf
darylf / gist:2354060
Created Apr 10, 2012
Validate date format in C#
View gist:2354060
/// <summary>
/// Validate date is a proper format
/// </summary>
/// <param name="date"></param>
/// <returns></returns>
public static bool IsDate(string date)
{
bool valid = true;
//check in 99/99/9999 format
valid = Regex.IsMatch(date, "^[0-9]{2}/[0-9]{2}/[0-9]{4}$");
@darylf
darylf / growl.watchr.rb
Created Aug 27, 2011
Combining Watchr, Spork, and Growl for Ruby on Rails testing.
View growl.watchr.rb
# Combined from:
# [1] http://www.rubyinside.com/how-to-rails-3-and-rspec-2-4336.html
# [2] https://gist.github.com/600976
unless defined?(GROWL)
$stderr.sync=true
$stdout.sync=true
ENV["WATCHR"] = "1"
GROWL=`which growlnotify`.chomp
You can’t perform that action at this time.