Skip to content

Instantly share code, notes, and snippets.

View pinscript's full-sized avatar

Alexander Berg pinscript

View GitHub Profile
@pinscript
pinscript / gist:1140612
Created August 11, 2011 20:08
Scheduled tasks spike
public void Configure(Context ctx) {
// Single tasks
ctx.Run(() => Tasks.First()).Every.Midnight;
ctx.Run(() => Tasks.Second()).Every.Day(8,0));
// Multiple tasks
ctx.Run(() => {
Tasks.Third();
Tasks.Fourth();
}).Every.Day(8,0);
public class OptimizationShowViewModel : RestrictedViewModel {
public string AvailableDate { get; set; }
public string Type { get; set; }
public string DescriptionReciever { get; set; }
public string Status { get; set; }
public string WaitingUntil { get; set; }
public string WaitReason { get; set; }
public string Technician { get; set; }
public void OptimizationShowViewModel() {
(function ($) {
$.fn.wizard = function (settings) {
var wizard = $(this);
// Find and hide all steps
var steps = wizard.find(".wizard-step");
steps.hide();
// Show first step
steps.first().show();
<div class="wizard">
<div class="wizard-step wizard-step-1" data-step="1">
<h2>Steg 1</h2>
<p class="description">Beskrivning ett</p>
Första steget...
</div>
<div class="wizard-step wizard-step-1" data-step="1">
<h2>Steg 1</h2>
.wizard ul {
list-style: none outside none;
margin: 0 0 15px;
padding: 0;
}
.wizard ul li {
-moz-user-select: none;
background: -moz-linear-gradient(center top , #F7F7F7, #E1E1E1) repeat scroll 0 0 transparent;
color: #333333;
ul {
list-style: none outside none;
margin: 0 0 15px;
padding: 0;
}
ul li {
-moz-user-select: none;
background: -moz-linear-gradient(center top , #F7F7F7, #E1E1E1) repeat scroll 0 0 transparent;
color: #333333;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
namespace ConsoleApplication12 {
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
alert('ok');
var str = $('#presentation div').data('options');
alert(str.trigger);
});
</script>
<html>
<head>
<style>
div { border: 1px dashed orange; padding: 10px; display: none; margin-bottom: 20px; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("[data-publish]").click(function() {
var eventName = $(this).data('publish');
Server Software: Apache/2.2.3
Server Hostname: www.mediaanalys.net
Server Port: 80
Document Path: /
Document Length: 36930 bytes
Concurrency Level: 10
Time taken for tests: 41.186 seconds
Complete requests: 1000