A version of Mike Bostock’s animated world countries, which uses a more accurate spherical interpolation.
This file contains 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
Observable.FromEvent<SensorReadingEventArgs<CompassReading>>(compass, "CurrentValueChanged") | |
.BufferWithTime(TimeSpan.FromSeconds(2)) | |
.Select(headings => headings.Select(e => e.EventArgs.SensorReading.TrueHeading).Sum() / headings.Count()) | |
.ObserveOnDispatcher() | |
.Subscribe(heading => this.ArrowRotation.Angle = 360 - heading); |
This file contains 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
var WA_API_KEY = @""; | |
var VoiceOut = new System.Speech.Synthesis.SpeechSynthesizer(); | |
VoiceOut.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult, 0, CultureInfo.CurrentCulture); | |
VoiceOut.SetOutputToDefaultAudioDevice(); | |
var WA = new WAClient(WA_API_KEY); | |
WA.OnResultReceived += (WAResult, input) => | |
{ | |
try |
This file contains 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
require 'net/ssh' | |
# Start Pageant and load your github & server identity keys | |
# :verbose => Logger::DEBUG | |
Net::SSH.start("your ssh server.com", "your username", { :forward_agent => true }) do |ssh| | |
result = ssh.exec!("ls -la ~") | |
puts result | |
# puts 'waiting on open channel...' |
This file contains 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
require 'win32ole' | |
wmi = WIN32OLE.connect('winmgmts://') | |
result = wmi.ExecQuery('select SecondLevelAddressTranslationExtensions from Win32_Processor').to_enum.first | |
if result && result.SecondLevelAddressTranslationExtensions | |
puts 'SLAT Available' | |
else | |
puts 'SLAT Not Available' | |
end |
This file contains 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
var size = { | |
width: 650, | |
padding: 60, | |
radius: 250, | |
}; | |
// scale from unit positions to pixel positions | |
var scale = { | |
pixel: d3.scale.linear() | |
.domain([-1, 0, 1]) |
This file contains 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
@echo off | |
REM Usage: `up <n>` | |
REM Will run `cd ..` n times | |
REM Put this file (`up.bat`) somewhere in your PATH | |
set many=1 | |
if not "%1"=="" set many=%1 | |
for /l %%x in (1, 1, %many%) do cd .. |
This file contains 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; | |
namespace FMUtils.FlexTreeView.Extensions | |
{ | |
public static class IEnumerableExtensions | |
{ | |
public static IEnumerable<T> Realize<T>(this IEnumerable<T> source, Action<T> action) | |
{ | |
foreach (T el in source) |
This file contains 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
c:\>curl http://localhost:65432/wat/ | |
Hiya mister curl/7.26.0 | |
c:\> |
This file contains 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
everything i write on medium is plausible to someone | |
xoxo j$ |