This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace PSI.Common.Appointments | |
{ | |
public enum AppointmentState | |
{ | |
[Description("Appointment #{0} Scheduled for {1} Confirmed and On Time")] | |
Confirmed = 0, | |
[Description("Appointment #{0} Scheduled for {1} Confirmed within Grace Peroid")] | |
ConfirmedWithinGracePeriod = 1, | |
[Description("Appointment #{0} Scheduled for {1} Confirmed Late")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Geocodio | |
{ | |
public string ApiKey { get; set; } | |
public GeocodioResponse GeoCodeByCityState(string address) | |
{ | |
var client = new RestClient("http://api.geocod.io/v1/"); | |
// client.Authenticator = new HttpBasicAuthenticator(username, password); | |
var request = new RestRequest("geocode", Method.GET); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import * | |
from fabric.contrib.files import * | |
env.host_string = 'your.host.ip.here' | |
env.user = 'root' | |
def change_my_password(): | |
prompt('Specify new password: ', 'new_password') | |
runcmd('echo {un}:{pw} | chpasswd'.format(un=env.user, pw=env.new_password)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import * | |
from fabric.contrib.files import * | |
env.user = 'your_user' | |
env.host_string = 'your_host' | |
def add_teamcity_user(): | |
runcmd('adduser --system --shell /bin/bash --gecos \'TeamCity Build Control\' --group --disabled-password --home /opt/teamcity teamcity') | |
def download_teamcity(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dashboardClient = new DashboardClient("** Your API Key Here **"); | |
var dashboard = new Dashboard() | |
{ | |
Name = dashboardName, | |
Background = "dark wood", | |
}; | |
dashboard = dashboardClient.Create(dashboard); | |
var leaderboard = client.Create(new Widget() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<log4net> | |
<appender name="DucksboardAppender" type="DucksboardLog4NetLogger.DucksboardAppender"> | |
<apiKey value="[your api key]" /> | |
<widgetId value="[your widget id]" /> | |
<layout type="log4net.Layout.PatternLayout"> | |
<conversionPattern value="%date | %-5level | %message~%newline" /> | |
</layout> | |
</appender> | |
<logger name="[your logger name]"> | |
<level value="ALL" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Ducksboard; | |
using Ducksboard.Objects; | |
using log4net.Appender; | |
using log4net.Core; | |
namespace Logging.DucksboardLog4NetLogger | |
{ | |
public class DucksboardAppender : AppenderSkeleton | |
{ | |
private static DucksboardClient _ducksboardClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$last_updated = $wpdb->get_var( "SELECT last_updated FROM " . $wpdb->blogs. " WHERE public = '1' order by | |
`last_updated` desc limit 1"); | |
if(isset($last_updated)){ | |
$post_mod_date=date("D, d M Y H:i:s",strtotime($last_updated)); | |
header('Last-Modified: '.$post_mod_date.' GMT'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Nancy.Hosting.Self; | |
using Topshelf; | |
namespace Nancy.Demo.Hosting.TopShelf | |
{ | |
public class NancySelfHost | |
{ | |
private NancyHost _nancyHost; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Nancy.Demo.Hosting.Self | |
{ | |
using System; | |
using System.Diagnostics; | |
using Nancy.Hosting.Self; | |
class Program | |
{ | |
static void Main() |
NewerOlder