Skip to content

Instantly share code, notes, and snippets.

@jlyonsmith
jlyonsmith / ansible-bootstrap-ubuntu-16.04.yml
Created August 7, 2018 18:03 — forked from gwillem/ansible-bootstrap-ubuntu-16.04.yml
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@csherratt
csherratt / ui.md
Last active March 12, 2023 03:32
Flora's Rust UI ramblings

Rust UI Difficulties

I wanted to give a little bit of a discussion on all my thinking about why UI's are a tricky to get right in Rust. I want to try and differentiate this discussion because there are a number of decent UI frameworks that have been bound to Rust. This is great! I do not want to discourage any of their work, they are wonderful members of our community.

What this is about is how it would be possible to write a good UI framework

@dmachat
dmachat / react-native-maps-enable-google-maps-manual-instructions.md
Last active November 22, 2018 17:04 — forked from heron2014/react-native-maps-enable-google-maps-instructions.md
Instructions for manually installing Google Maps for react-native-maps

Install Google Maps for iOS manually for react-native-maps

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

After installing react-native-maps from npm:

  1. Drag this folder node_modules/react-native-maps/lib/ios/AirGoogleMaps/ into your project, and choose Create groups in the popup window.

  2. In xcode, right click on Libraries -> Add files to [your project], and navigate to and add node_modules/react-native-maps/lib/ios/AirMaps.xcodeproj. Select Copy files is necessary and Create groups.

@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@dhavaln
dhavaln / ViewController.swift
Created September 4, 2015 10:13
Swift / iOS - Extract Color from Image
func extractColor(image: UIImage){
let pixel = UnsafeMutablePointer<CUnsignedChar>.alloc(4)
let colorSpace:CGColorSpace = CGColorSpaceCreateDeviceRGB()
let bitmapInfo = CGBitmapInfo(CGImageAlphaInfo.PremultipliedLast.rawValue)
let context = CGBitmapContextCreate(pixel, 1, 1, 8, 4, colorSpace, bitmapInfo)
CGContextDrawImage(context, CGRectMake(0, 0, 1, 1), image.CGImage)
var color: UIColor? = nil
if pixel[3] > 0 {
@foxxjnm
foxxjnm / Blur.cs
Created February 16, 2015 15:58
Xamarin.iOS Image Blur
public static UIImage Blur(this UIImage image, float blurRadius = 25f)
{
if (image != null)
{
// Create a new blurred image.
var imageToBlur = new CIImage (image);
var blur = new CIGaussianBlur ();
blur.Image = imageToBlur;
blur.Radius = blurRadius;
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing