What is Kubernetes?
- Deploy a Kubernetes cluster on Digital Ocean using kubeadm
- (void)presentModalView | |
{ | |
CGFloat bounceDistance = 10.0; | |
CGFloat modalWidthPercentage = 0.9; | |
CGFloat modalHeightPercentage = 0.8; | |
UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow]; | |
CGRect frame = keyWindow.bounds; | |
// The screenView is a plain black view with opacity |
import UIKit | |
// Conform the `Polygon` protocol to specify the vertices of the polygon. | |
protocol Polygon { | |
var vertices: [CGPoint] { get } | |
} | |
// UIView conforms the protocol `Polygon` to specified the vertices of the rectangle. | |
extension UIView: Polygon { |
- (UIViewController *)topViewController{ | |
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
} | |
- (UIViewController *)topViewController:(UIViewController *)rootViewController | |
{ | |
if (rootViewController.presentedViewController == nil) { | |
return rootViewController; | |
} | |
from aws import bucket_exists, upload_path | |
bucket_name = 'cnns-music-vids' | |
directory_to_upload = 'data/' | |
output_s3_directory = 'data/' | |
if bucket_exists(bucket_name): | |
print('the bucket exists!') | |
else: | |
raise ValueError('nah the bucket does not exist') |
git config --global diff.tool bc | |
git config --global difftool.bc.path "C:\Program Files\Beyond Compare 4\BComp.exe" | |
git config --global merge.tool bc | |
git config --global mergetool.bc.path "C:\Program Files\Beyond Compare 4\BComp.exe" | |
git config --global alias.mydiff "difftool --dir-diff --tool=bc --no-prompt" |
// path: store/basket/basket.ts (module) | |
import { RootState } from "../../store" | |
import inventory, { Product } from "../inventory/inventory" | |
export interface Item { productId: string, quantity: number } | |
export interface DisplayItem { product: Product, quantity: number } | |
export interface BasketState { items: Item[], isLoading: boolean } | |
const initialBasketState: BasketState = { items: [], isLoading: false } |
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
var path = "/Users/novalagung/Documents/temp/test.txt" |
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
var path = "/Users/novalagung/Documents/temp/test.txt" |
I'm using this Vagrantfile
to run Kafka on a Windows 8.1 laptop for development purposes.
It runs the ultra-lightweight boot2docker Linux, then uses Vagrant's Docker provisioning support to spin up ZooKeeper and Kafka.
The fun bits to work out were:
-p
flag), so you can access the instance from Windows using localhost:9092