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
# Convert vmdk image to vdi image | |
+ example kdenlive demo image | |
VBoxManage clonehd --format vdi kdenlive-x64-20090612.vmdk kdenlive.vdi | |
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% | |
Clone hard disk created in | |
format 'vdi'. UUID: 16b93434-ad55-465d-ad2a-77dab75c9223 | |
# htop iotop atop pciutils | |
# vmware tools and setup |
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
# read info from the current host | |
# replace "." with your remote host - if you like | |
$OS = get-wmiobject win32_operatingsystem -ComputerName . | |
# default values | |
$OSSP = "{n.a}" | |
$OSName = "{n.a}" | |
$OSLastBoot = "{n.a}" | |
$OSUpTime = "{n.a}" |
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 System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace demo_03.Controllers | |
{ | |
public class JsonController : Controller | |
{ |
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
/* link to the source: http://webdesign.about.com/od/css3/qt/alternating-row-styles-tables.htm */ | |
/* http://www.w3schools.com/css/css_pseudo_classes.asp */ | |
/*table http://webdesign.about.com/od/tables/ss/aa120897.htm */ | |
/* Select the last 4 element from a list */ | |
li:nth-last-child(-n+4) { background-color: #ccc; } | |
/* zebra */ | |
li:nth-child(odd){background-color: #eee;} | |
li:nth-child(even){background-color: #ddd;} | |
/* zebra rows in table */ |
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 pattern = @"^Sl[A-Z]{1}"; | |
var stringSearch = "SlKanton"; | |
var demo = Regex.Match(stringSearch, pattern); | |
Console.WriteLine("Wurde der Wert gefunden ? : {0} der wert is : {1}",demo.Length ,demo.Value); | |
if (demo.Success) | |
{ | |
Console.WriteLine(stringSearch.Remove(demo.Index, demo.Length - 1)); | |
} | |
Console.ReadLine(); |
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
$("tr:nth-child(odd)").addClass("odd"); | |
$("tr:nth-child(odd)").hover(function(){ | |
$(this).addClass("odd_over"); | |
},function(){ | |
$(this).addClass("odd_out"); | |
}); | |
$("tr:nth-child(even)").hover(function(){ | |
$(this).addClass("even_over"); |
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
# rvm homepage :http://beginrescueend.com/ | |
# rubyonrails homepage :http://rubyonrails.org/ | |
# using gemset : http://beginrescueend.com/gemsets/using/ | |
# js env : https://github.com/sstephenson/execjs | |
# heroku hosting : http://www.heroku.com/ | |
# github repo : https://github.comlow | |
# gmate for gedit : https://github.com/gmate/gmate | |
# ruby dependencies | |
sudo apt-get install build-essential openssl libssl-dev libreadline6 libreadline6-dev curl |
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
[TestMethod] | |
public void Description_Should_Be_Required() | |
{ | |
Expression<Func<MenuCategoryBusinessObject, object>> expression = | |
o => o.Description; | |
var me = expression.Body as MemberExpression; | |
var att = (RequiredAttribute[])me.Member | |
.GetCustomAttributes(typeof(RequiredAttribute), false); | |
att.Length.ShouldEqual(1); | |
} |
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.Web.Mvc; | |
namespace Starwolf.ch.Helpers | |
{ | |
public static class MyHelpers | |
{ | |
public static MvcHtmlString Script(this HtmlHelper helper, string src) | |
{ | |
// <script src="@Url.Content("~/Scripts/jquery-1.6.1.min.js")" type="text/javascript"></script> | |
var builder = new TagBuilder("script"); |
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
<!--<rewrite> | |
<rules> | |
<rule name="Redirect to HTTPS" enabled="true" stopProcessing="true"> | |
<match url="^home" ignoreCase="true" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="true"> | |
<add input="{HTTPS}" pattern="off" /> | |
<add input="{HTTP_HOST}" pattern="([^/:]*?):[^/]*?" /> | |
</conditions> | |
<action type="Redirect" url="https://{C:1}:44300/{REQUEST_URI}" /> | |
</rule> |