Using the lladdr 00:11:22:33:44:55
option in the OpenVPN client custom configuration form doesn't change the MAC of the tap interface.
Paste this in the custom configuration box:
script-security 2
// Only add setZeroTimeout to the window object, and hide everything | |
// else in a closure. | |
(function() { | |
var timeouts = []; | |
var messageName = "zero-timeout-message"; | |
// Like setTimeout, but only takes a function argument. There's | |
// no time argument (always zero) and no arguments (you have to | |
// use a closure). | |
function setZeroTimeout(fn) { |
*.js diff="javascript" |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Data.SqlClient; | |
using Dapper; | |
// to have a play, install Dapper.Rainbow from nuget |
public class PasswordHash | |
{ | |
public const int SaltByteSize = 24; | |
public const int HashByteSize = 20; // to match the size of the PBKDF2-HMAC-SHA-1 hash | |
public const int Pbkdf2Iterations = 1000; | |
public const int IterationIndex = 0; | |
public const int SaltIndex = 1; | |
public const int Pbkdf2Index = 2; | |
public static string HashPassword(string password) |
module Person = | |
open System | |
type PersonState = private { id: Guid; name: string; age: int} | |
let createPerson id name age = {id = id; name = name; age = age} | |
let changeName name personState = {personState with name = name} | |
let changeAge age personState = | |
// some crazy business rule involving age | |
{personState with age = age} | |
module SomeOtherModule = |
Use React with Gulp, Browserify and Babelify. This allows you to use React in jsx & node.js style.
It let's you use require('module')
in your JavaScript. Babelify will transform the jsx code to JavaScript code.
gulp build-react
This will generate a main.min.js
file in the build
directory with sourcemaps.
admin.addPeer("enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303"); | |
admin.addPeer("enode://3338fd63203ca8f079c79c3fc5bcdaa9ee8ad8f64a48ddfb0022b77f623768eb08e82576fc1c8356a0f588ad9162989704d16e9fc0e6f0bd9feb8f7e80ed1b5f@5.189.149.113:35555"); |
initialize: -> | |
@bind 'all', @_trackPageview | |
_trackPageview: -> | |
url = Backbone.history.getFragment() | |
_gaq.push(['_trackPageview', "/#{url}"]) |
function Get-FileEncoding($Path) { | |
$bytes = [byte[]](Get-Content $Path -Encoding byte -ReadCount 4 -TotalCount 4) | |
if(!$bytes) { return 'utf8' } | |
switch -regex ('{0:x2}{1:x2}{2:x2}{3:x2}' -f $bytes[0],$bytes[1],$bytes[2],$bytes[3]) { | |
'^efbbbf' { return 'utf8' } | |
'^2b2f76' { return 'utf7' } | |
'^fffe' { return 'unicode' } | |
'^feff' { return 'bigendianunicode' } |