Skip to content

Instantly share code, notes, and snippets.

View anaisbetts's full-sized avatar

Ani Betts anaisbetts

View GitHub Profile
PLATFORM VERSION INFO
Windows : 6.2.9200.0 (Win32NT)
Common Language Runtime : 4.0.30319.34014
System.Deployment.dll : 4.0.30319.33440 built by: FX45W81RTMREL
clr.dll : 4.0.30319.34014 built by: FX45W81RTMGDR
dfdll.dll : 4.0.30319.33440 built by: FX45W81RTMREL
dfshim.dll : 6.3.9600.16384 (winblue_rtm.130821-1623)
SOURCES
Deployment url : https://npe.codeplex.com/releases/clickOnce/NuGetPackageExplorer.application
@anaisbetts
anaisbetts / scriptcs
Created May 3, 2014 23:13
ScriptCS binstub
#!/usr/bin/env mono
## Make sure to chmod +x this file!
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mono "$DIR/scriptcs.exe" $@
[Preserve]
public class NeverDoAnythingWithThisClassJustIncludeIt
{
public void EspeciallyDontCallThisMethod()
{
UITextField field = null;
field.Text = "Bar";
}
}
@anaisbetts
anaisbetts / remove_all_sn.rb
Created May 16, 2014 04:37
Scripts to clean up The Strong Naming Problem
#!/usr/bin/env ruby
## Usage:
##
## ./remove_all_sn.rb ./my/git_directory
files = `cd #{ARGV[0]} && git ls-tree -r --name-only HEAD | grep '\.csproj$'`.split "\n"
files.each {|x| `ruby remove_sn.rb #{ARGV[0]}/#{x}`}
namespace MobileSample_Android
{
[Application(Label = "AndroidPlayground")]
public class App : Application
{
readonly AutoSuspendHelper suspendHelper;
public App()
{
protected override void OnNavigatedTo(NavigationEventArgs e)
{
const string template = "<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:xaml='using:ReactiveUI.Xaml'>" +
"<xaml:ViewModelViewHost />" +
//"<xaml:ViewModelViewHost ViewModel=\"{Binding}\" VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" IsTabStop=\"False\" />" +
"</DataTemplate>";
// Throws "WinRT information: The type '%0' was not found. [Line: 1 Position: 137]
// Additional information: The text associated with this error code could not be found.
//
var results = await githubClient.Miscellaneous.GetEmojis()
.Select(x => Observable.FromAsync(async () => {
var path = Path.Combine(outputDirectory, emoji.Name + ".png");
await DownloadImage(x.Url, path);
return path;
}))
.Merge(4)
.ToArray();
@anaisbetts
anaisbetts / logcat.txt
Created July 2, 2014 04:23
Chromecast + Mirror
I/MediaRouterService( 861): Selected global route:Route TV: Mirror (com.koushikdutta.mirror/.ChromecastDisplayProviderService:mirror:com.google.android.gms/.cast.media.CastMediaRouteProviderService:f51ac32692126fe6242ff6e604a38bd1)
I/OMXClient( 6721): Using client-side OMX mux.
E/ACodec ( 6721): Unable to instantiate a decoder for type 'video/x-vnd.on2.vp8'.
E/MediaCodec( 6721): Codec reported an error. (omx error 0x80001003, internalError -2147483648)
E/JavaBinder( 6721): *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
E/JavaBinder( 6721): java.io.IOException: Failed to allocate component instance
E/JavaBinder( 6721): at android.media.MediaCodec.native_setup(Native Method)
E/JavaBinder( 6721): at android.media.MediaCodec.<init>(MediaCodec.java:210)
E/JavaBinder( 6721): at android.media.MediaCodec.createEncoderByType(MediaCodec.java:194)
E/JavaBinder( 6721): at com.koushikdutta.mirror.WebRtcDevice$4.createMediaCodec(WebRtcDevice.java:192)
path = require 'path'
module.exports = (grunt) ->
spawn = (options, callback) ->
childProcess = require 'child_process'
stdout = []
stderr = []
error = null
proc = childProcess.spawn options.cmd, options.args, options.opts
proc.stdout.on 'data', (data) -> stdout.push data.toString()
@anaisbetts
anaisbetts / livereload.coffee
Created November 8, 2014 00:36
Livereload in Atom Shell
fs = require 'fs'
remote = require 'remote'
require 'fs-plus'
Notify = require 'fs.notify'
rx = require 'rx'
module.exports =
class LiveReload
constructor: (dirs...) ->