Skip to content

Instantly share code, notes, and snippets.

View AddressXception's full-sized avatar

AddressXception AddressXception

View GitHub Profile
@AddressXception
AddressXception / install-latest-compose.sh
Created June 16, 2019 15:41 — forked from deviantony/install-latest-compose.sh
Install latest version of Docker Compose
#!/bin/bash
# get latest docker compose released tag
COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
# Install docker-compose
sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
chmod +x /usr/local/bin/docker-compose
sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
@AddressXception
AddressXception / EasyLayoutExample.cs
Last active September 11, 2015 14:22 — forked from praeclarum/EasyLayoutExample.cs
Here is an example of using my [EasyLayout](https://gist.github.com/praeclarum/6225853) library. Note the use of <= and >=, these are very difficult to write in old fashioned (frame-based) layout code. Also note the extension method GetMidY() that emulates Center.Y. You can also use GetBaseline() that works for baseline-aware views.
ContentView.ConstrainLayout (() =>
border.Frame.Top == ContentView.Frame.Top &&
border.Frame.Height == 0.5f &&
border.Frame.Left == ContentView.Frame.Left &&
border.Frame.Right == ContentView.Frame.Right &&
nameLabel.Frame.Left == ContentView.Frame.Left + hpad &&
nameLabel.Frame.Right == ContentView.Frame.GetMidX () - 5.5f &&
nameLabel.Frame.Top >= ContentView.Frame.Top + vpad &&
@AddressXception
AddressXception / EasyLayout.cs
Last active September 11, 2015 14:22 — forked from praeclarum/EasyLayout.cs
EasyLayout makes writing auto layout code in Xamarin.iOS easier. See [the example](https://gist.github.com/praeclarum/8185036) for hints on how to use this library.
//
// Copyright (c) 2013-2015 Frank A. Krueger
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//