Skip to content

Instantly share code, notes, and snippets.

@thinktainer
thinktainer / .gitignore
Created January 14, 2012 10:49
Visual Studio gitignore file
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
@thinktainer
thinktainer / pci.py.patch
Created March 31, 2012 15:48
xend patch for inspiron with optimus gfx card
--- /root/pci.py 2012-03-31 16:36:52.633262092 +0100
+++ /usr/lib/xen-4.1/lib/python/xen/util/pci.py 2012-03-31 16:41:00.057262001 +0100
@@ -1266,7 +1266,12 @@
pass
def get_info_from_sysfs(self):
- self.find_capability(0x11)
+ try:
+ self.find_capability(0x11)
+ except PciDeviceParseError, err:
@thinktainer
thinktainer / xend.log
Created March 31, 2012 15:58
Error Log
Traceback (most recent call last):
File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/server/SrvDaemon.py", line 341, in run
servers = SrvServer.create()
File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/server/SrvServer.py", line 258, in create
root.putChild('xend', SrvRoot())
File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/server/SrvRoot.py", line 40, in __init__
self.get(name)
File "/usr/lib/xen-4.1/bin/../lib/python/xen/web/SrvDir.py", line 84, in get
val = val.getobj()
File "/usr/lib/xen-4.1/bin/../lib/python/xen/web/SrvDir.py", line 52, in getobj
@thinktainer
thinktainer / stop_cassini.ps1
Created May 2, 2012 10:10
Powershell snippet to stop all running cassini instances
stop-process -name webdev*
@thinktainer
thinktainer / appcmd_add_bindings.bat
Created August 11, 2012 10:48
command to add bindings to iis express
C:\Program Files\IIS Express\appcmd.exe set site /site.name:"Your Site Name" /bindings:"http/*:port:hostnmae, ..."
@thinktainer
thinktainer / aapcmd_not_working.bat
Created August 11, 2012 10:56
Appcmd not working for IIS Express
C:\Program Files\IIS Express\appcmd.exe set site /site.name:"Your Site Name" /+bindings.[protocol="http", bindingInformation="http/*:port:hostname"]
@thinktainer
thinktainer / iis_express_set_urls.xml
Created August 11, 2012 11:04
Set IIS Express urls from csproj
<PropertyGroup>
<AppCmd>&quot;$(ProgramFiles)\IIS Express\appcmd.exe&quot; set site</AppCmd>
<BindingsParam>/bindings:&quot;http/*:port:host1,http/*:port:host2&quot;</BindingsParam>
<PropertyGroup>
<Target Name="SetIISUrls">
<Exec Command="$(AppCmd) $(BindingsParam)" />
</Target>
@thinktainer
thinktainer / powershell-ctags
Created August 22, 2012 08:47
Add powershell ctags
ctags.exe -R --langdef=powershell --langmap=powershell:.ps1,.psm1 --regex-powershell="/^function[\t ]*([a-zA-Z0-9_-]+)/\1/d,definition/" --regex-powershell="/^filter[\t ]*([a-zA-Z0-9_-]+)/\1/d,definition/" *
@thinktainer
thinktainer / checkoutsvnbranches.sh
Created September 19, 2012 16:17
check out branches from subversion in git
#!bin/sh
git-for-each-ref | cut -d / -f 4 | while read ref; do git checkout -b $ref remotes/svn/$ref; done
map <Leader>rt :!/usr/local/bin/ctags --language-force=ruby --exclude=.git --exclude=log -R * `bundle show --paths`