Skip to content

Instantly share code, notes, and snippets.

View anaisbetts's full-sized avatar

Ani Betts anaisbetts

View GitHub Profile
P U S H B U L L E T I S C O O L
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 9066e2f..1cc22da 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -97,6 +97,10 @@ using blink::WebMouseEvent;
using blink::WebMouseWheelEvent;
using blink::WebGestureEvent;
+namespace content {
+ extern bool g_support_transparency;
@anaisbetts
anaisbetts / clean-merged-branches
Created December 16, 2014 18:43
Clean merged branches
#!/bin/sh
#/ Usage: clean-merged-branches [-f]
#/ Delete merged branches from the origin remote.
#/
#/ Options:
#/ -f Really delete the branches. Without this branches are shown
#/ but nothing is deleted.
set -e
@anaisbetts
anaisbetts / TabbedRoutedViewHost.cs
Created December 15, 2014 10:49
Tabbed-view compatible RoutedViewHost
using System;
using Xamarin.Forms;
using Splat;
using ReactiveUI;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
using System.Diagnostics;
namespace ReactiveUI.XamForms
{
_.extend(HTMLElement.prototype, {
animateObservable: function(effect, timing) {
element = this
return Rx.Observable.create(function(subj) {
var player = element.animate(effect, timing)
player.onfinish = function() {
subj.onNext(true)
subj.onCompleted()
public async IObservable<int> takeStream(IObservable<int> enum, int count)
{
int i = 0;
return Observable.Create<int>(subj =>
{
foreach (int x in enum)
{
Task<int> task = somethingAsync(x);
int y = await task;
@anaisbetts
anaisbetts / build-atom-shell-task.coffee
Created December 6, 2014 04:26
Build Atom Shell from source instead of downloading it
fs = require 'fs'
path = require 'path'
rx = require 'rx'
module.exports = (grunt) ->
{cp, mkdir, rm, spawn} = require('./task-helpers')(grunt)
spawnObservable = (options={}) ->
rx.Observable.create (subj) ->
grunt.verbose.ok "Running: #{options.cmd} #{options.args.join ' '}"
@anaisbetts
anaisbetts / .gitattributes
Created December 3, 2014 16:26
USE THIS GITATTRIBUTES FOR EVERY NEW PROJECT FOREVER AND EVER
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
@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...) ->
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()