This file contains hidden or 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
CmdUtils.CreateCommand({ | |
names: ['qr code', 'encode'], | |
icon: "http://img205.imageshack.us/img205/231/qrcodezh1.gif", | |
description: "Generates QR Code image based on selected url", | |
argument: noun_type_url, | |
preview: function(pBlock, {object}) { | |
pBlock.innerHTML = '<img src="' + 'http://qrcode.kaywa.com/img.php?s=6&d=' + escape(object.text) + '" />'; | |
}, | |
execute: function(args) { | |
Utils.openUrlInBrowser('http://qrcode.kaywa.com/img.php?s=8&d=' + escape(args.object.text)); |
This file contains hidden or 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
/* | |
This class should decode everything that is described in Chapter 2.4.4.4 Character literals of C# Language Specification. | |
See http://msdn.microsoft.com/en-us/library/aa691087.aspx for details. | |
I actually have test cases in the project in case you wondered, but feel free to test it for yourself. | |
It's free to use without limitations, but you must not expect any warranty or support for this code either. | |
*/ |
This file contains hidden or 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.Numerics; | |
namespace Math.Statistics | |
{ | |
public static class Statistics | |
{ | |
public static long Mean(this IEnumerable<long> data) | |
{ |
This file contains hidden or 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
public static class CastingHelper | |
{ | |
public static T CastToStruct<T>(this byte[] data) where T : struct | |
{ | |
var pData = GCHandle.Alloc(data, GCHandleType.Pinned); | |
var result = (T)Marshal.PtrToStructure(pData.AddrOfPinnedObject(), typeof(T)); | |
pData.Free(); | |
return result; | |
} |
This file contains hidden or 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
internal class GitInfo : VcsInfoRetriever | |
{ | |
public override VcsInfoData Execute(string localPath) | |
{ | |
string relativePath; | |
var repoPath = FindRepoRoot(localPath, ".git\\index", out relativePath); | |
if (repoPath == null) return null; | |
using (var repo = new Repository(repoPath)) | |
{ |
This file contains hidden or 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
public static class KeyValuePair | |
{ | |
public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) | |
{ | |
return new KeyValuePair<TKey, TValue>(key, value); | |
} | |
} |
This file contains hidden or 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.Collections.Generic; | |
namespace System.Linq.Enumerable | |
{ | |
public static class Quickselect | |
{ | |
/// <summary> | |
/// Selects <b>count</b> <i>smallest</i> elements according to a key. Result is returned in no particular order. | |
/// </summary> | |
/// <typeparam name="T">Type of elements in collection</typeparam> |
This file contains hidden or 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
#!/bin/sh | |
opkg update | |
opkg remove dnsmasq | |
opkg install dnsmasq-full 6in4 tc miniupnpd luci-ssl luci-proto-ipv6 luci-app-upnp uhttpd-mod-tls | |
rm /etc/config/*-opkg | |
cp /etc/config/uhttpd.crt /etc/config/ | |
cp /etc/config/uhttpd.key /etc/config/ | |
cp /etc/config/dnscachestats.sh ~/ |
This file contains hidden or 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
//he.net | |
216.218.221.6 | |
216.218.221.42 | |
74.82.46.6 | |
216.66.84.46 | |
216.66.86.114 | |
216.66.87.14 | |
216.66.80.30 | |
216.66.80.26 | |
216.66.84.42 |
This file contains hidden or 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
declare module ActiveX { | |
export interface IXMLDOMNode { | |
attributes: IXMLDOMNamedNodeMap; | |
baseName?: string; | |
childNodes: IXMLDOMNodeList; | |
dataType?: string; | |
definition?: IXMLDOMNode; | |
firstChild: IXMLDOMNode; | |
lastChild: IXMLDOMNode; | |
namespaceURI?: string; |
OlderNewer