Skip to content

Instantly share code, notes, and snippets.

Arun Mahapatra codito

Block or report user

Report or block codito

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
codito / pyembed.c
Last active Nov 19, 2017
A simple embedded python interpreter
View pyembed.c
// Demo a simple embedded python interpreter
// See this post for context:
// Compile with: gcc $(python-config --cflags --ldflags) pyembed.c -o pyembed
// Tested on python 3.6 in arch linux
// See for details of APIs.
#include <Python.h>
codito /
Created Oct 3, 2017
Running tests from published project
> mkdir g:\tmp\trial
> cd g:\tmp\trial
> dotnet --info
.NET Command Line Tools (2.0.2-vspre-006949)

Product Information:
 Version:            2.0.2-vspre-006949
 Commit SHA-1 hash:  23fc6ec23d
codito /
Last active Jan 10, 2019
QtDBus demo with PyQt5
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from PyQt5 import QtCore, QtDBus, QtWidgets
def notify(header, msg):
item = "org.freedesktop.Notifications"
path = "/org/freedesktop/Notifications"
interface = "org.freedesktop.Notifications"
codito /
Last active Aug 29, 2015
Spike on markdown for Slokas
# -*- coding: utf-8 -*-
import CommonMark
if __name__ == "__main__":
with open("") as f:
parser = CommonMark.DocParser()
renderer = CommonMark.HTMLRenderer()
ast = parser.parse(
html = renderer.render(ast)
json = CommonMark.ASTtoJSON(ast)
codito / SampleAzureVagrantFile
Created Mar 1, 2015
Sample VagrantFile for creating a VM in azure with vagrant
View SampleAzureVagrantFile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# debug net http
require 'net/http'
module Net
class HTTP
def self.enable_debug!
#raise "You don't want to do this in anything but development mode!" unless Rails.env == 'development'
class << self
codito / Update-TestPlatformAssemblyBinding.ps1
Created Aug 26, 2014
Script to update assembly bindings to support 3rd party test adapters in Visual Studio Test Platform
View Update-TestPlatformAssemblyBinding.ps1
# Script to update assembly bindings to support 3rd party test adapters in Visual Studio Test Platform
# Applies to VS 2014 CTP 3 bits
# Needs to run as Admin, please use it at your own risk
function Update-AssemblyBinding($configFile)
Write-Host "Updating $configFile"
[xml] $config = Get-Content $configFile
codito /
Last active Aug 29, 2015
Running Windows Phone unit tests in team build (TFS)

Running Windows Phone unit tests in team build (TFS)


  • Build Agent needs to run a physical x64 Windows 8.1 based machine to be able to run Phone emulators
  • Setup build agent to run as an interactive process and enable it to run unit tests (obtain developer license). Check this MSDN page for more help on this.
  • Install Visual Studio 2013 + Update 2 (with support for Phone development) on Build Agent

Once you have these, you can use custom scripts in TFS 2013 build definition to run phone tests using vstest.console command line. See the script RunPhoneTests.bat

codito / 0001-Comtype-Fix-metaclass-conflict.patch
Created Aug 12, 2013
Fix for metaclass conflict. Get the latest snapshot of comtypes from svn. Run refactoring. Then apply the following patch. (Tested with Python 3.3.2/Windows 8/x86).
View 0001-Comtype-Fix-metaclass-conflict.patch
comtypes/ | 8 ++++++--
comtypes/ | 4 +++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/comtypes/ b/comtypes/
index 6590ead..fa604af 100644
--- a/comtypes/
+++ b/comtypes/
@@ -268,7 +268,9 @@ class _cominterface_meta(type):
# Script to speak out GRE words, turn it on and sleep ;)
# Get wordlist from
#espeakcmd="espeak -g 1 -s 170 -a 150 -p 10 -v english-us"
espeakcmd="festival --tts"
shuf GREwordlist.txt | while read line
word=`echo $line | cut -f 1 -d " " -`
meaning=`echo $line | cut -f 2- -d " " -`
codito /
Created Feb 1, 2012
WinDBG Debug Snippets

Kernel driver debugging tips

Enable DbgPrint/KdPrint


reg add "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Debug Print Filter" /v DEFAULT /t REG_DWORD /d 0xFFFFFFFF

You can’t perform that action at this time.