Skip to content

Instantly share code, notes, and snippets.

@rarous
rarous / XElementExtensions.cs
Created July 20, 2012 12:11
Convert XElement to XmlElement
using System.Xml;
using System.Xml.Linq;
public static class XElementExtensions
{
public static XmlElement ToXmlElement(this XElement el)
{
var doc = new XmlDocument();
doc.Load(el.CreateReader());
return doc.DocumentElement;
@perky
perky / ProFi.lua
Created May 30, 2012 20:32
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()
@nicerobot
nicerobot / README.md
Last active February 19, 2025 02:01
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh