gcloud compute instances create ubuntu-dev-machine --machine-type=n1-standard-16 --image-family="ubuntu-1804-lts" --image-project="ubuntu-os-cloud" --zone=us-central1-c --boot-disk-size=200GB --boot-disk-type=pd-ssd
gcloud compute ssh ubuntu-dev-machine
sudo apt-get update
sudo apt-get -y install build-essential
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
- (BOOL)compareColors:(UIColor *)firstColor toSecondColor:(UIColor *)toSecondColor { | |
BOOL areColorsEqual = CGColorEqualToColor(firstColor.CGColor, toSecondColor.CGColor); | |
return areColorsEqual; | |
} |
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
//Under Facebook.m | |
- (void)authorizeWithFBAppAuth:(BOOL)tryFBAppAuth | |
safariAuth:(BOOL)trySafariAuth { | |
//Disable Facebook App Auth and only use native popup auth | |
tryFBAppAuth = NO; | |
trySafariAuth = NO; | |
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: | |
_appId, @"client_id", |
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
#user.rb | |
class User < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
# Setup accessible (or protected) attributes for your model |
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
#user.rb | |
class User < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
# Setup accessible (or protected) attributes for your model |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"github.com/godbus/dbus/v5" | |
) |
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
Sending build context to Docker daemon 94.62MB | |
Step 1/21 : FROM alpine:3.12 AS build | |
---> d6e46aa2470d | |
Step 2/21 : RUN apk --no-cache add libc6-compat device-mapper findutils zfs build-base linux-headers go bash git wget cmake pkgconfig ndctl-dev && apk --no-cache add thin-provisioning-tools --repository http://dl-3.alpinelinux.org/alpine/edge/main/ && echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && rm -rf /var/cache/apk/* | |
---> Running in 3cb87592a56b | |
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz | |
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz | |
(1/69) Upgrading musl (1.1.24-r9 -> 1.1.24-r10) | |
(2/69) Installing ncurses-terminfo-base (6.2_p20200523-r0) | |
(3/69) Installing ncurses-libs (6.2_p20200523-r0) |
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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 5.4.0-1029-gcp Kernel Configuration | |
# | |
# | |
# Compiler: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 | |
# | |
CONFIG_CC_IS_GCC=y | |
CONFIG_GCC_VERSION=90300 |
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
/* | |
Dockerfile | |
FROM golang:1.15 AS builder | |
WORKDIR /shutdown-example-app | |
COPY main.go /shutdown-example-app | |
RUN go build -o shutdown-example-app | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o shutdown-example-app . | |
FROM scratch |