This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playground - noun: a place where people can play | |
import UIKit | |
class ViewController: UIViewController ,UITableViewDelegate, UITableViewDataSource | |
{ | |
var tableView: UITableView! | |
var items: NSMutableArray! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password | |
# Updated to work with Vagrant 1.3.x | |
# Stage updated sudoers in a temporary file for syntax checking | |
TMP=$(mktemp -t vagrant_sudoers) | |
cat /etc/sudoers > $TMP | |
cat >> $TMP <<EOF | |
# Allow passwordless startup of Vagrant when using NFS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
creationTimestamp: null | |
generation: 1 | |
labels: | |
k8s-app: kube-proxy-amd64 | |
name: kube-proxy-amd64 | |
selfLink: /apis/extensions/v1beta1/namespaces/kube-system/daemonsets/kube-proxy-amd64 | |
namespace: kube-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.3 | |
ENV NGINX_VERSION 1.9.14 | |
ENV PAGESPEED_VERSION 1.11.33.0-beta | |
RUN build_pkgs="build-base linux-headers openssl-dev pcre-dev wget zlib-dev subversion git patch bash gperf python" && \ | |
runtime_pkgs="ca-certificates openssl pcre zlib" && \ | |
apk --no-cache --update add ${build_pkgs} ${runtime_pkgs} && \ | |
mkdir -p /tmp/src/mod_pagespeed/src && \ | |
cd /tmp/src && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Those should be JENKINS vars | |
NAME=nginx-deployment-3 | |
PODS_COUNT=3 | |
CONTAINER_NAME=nginx | |
DOCKER_IMAGE='nginx:1.8' | |
# Template can be copied from deploy.tmp.yaml to update jenkins var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Runtime image | |
# Following https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md | |
FROM node:7.7-alpine | |
# Add tini | |
RUN apk add --no-cache tini | |
ENTRYPOINT ["/sbin/tini", "--"] | |
WORKDIR /usr/src/app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check if this is the very first time that this script is running | |
if ([ ! -f /root/.not-a-new-instance.txt ]) then | |
newEC2Instance=true | |
fi | |
if ([ $newEC2Instance ]) then | |
whoami | |
cd /tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Foundation | |
import XCPlayground | |
XCPSetExecutionShouldContinueIndefinitely() | |
class RemoteAPI { | |
func getData(completionHandler: ((NSArray!, NSError!) -> Void)!) -> Void { | |
let url: NSURL = NSURL(string: "http://itunes.apple.com/search?term=Turistforeningen&media=software") | |
let ses = NSURLSession.sharedSession() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
OlderNewer