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
Compute compute = ComputeOptions.defaultInstance().service(); | |
String instanceName = "bla"; | |
String projectId = "blu"; | |
String zone = "ble"; // e.g. europe-west1-d | |
InstanceId instanceId = InstanceId.of(projectId, zone, instanceName); | |
Instance instance = compute.getInstance(instanceId); | |
try { |
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
List<String> data = new LinkedList<String>(); | |
// or if you know the amount of data upfront: | |
List<String> data = new ArrayList<String>(3); | |
data.add("hello"); | |
data.add("hello"); | |
data.add("bye"); | |
System.out.println(data.size()); // 3 | |
// in order to lookup data you always have to iterate the whole list until you find the value you're looking for |
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
// ... | |
var proxySnippet = require("grunt-connect-proxy/lib/utils").proxyRequest; | |
gruntConfig.connect = { | |
server: { | |
options: { | |
port: 9000, | |
hostname: "0.0.0.0", | |
keepalive: true, | |
middleware: function(connect, options) { |
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
keytool -list -keystore keystore.jks | |
keytool -export -alias 1 -keystore store.jks -file store2.crt | |
openssl x509 -in store2.crt -out store2-pem.crt -outform pem -inform der | |
keytool -v -importkeystore -srckeystore store.jks -srcalias 1 -destkeystore store2.p12 -deststoretype PKCS12 | |
openssl pkcs12 -in store2.p12 -out store2.pem | |
openssl rsa -in store2.key -inform DER -out store2-nopw.key | |
# https://devcenter.heroku.com/articles/ssl-endpoint#update-certificate |
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
// | |
// IDViewController.m | |
// MyFirstIndoorsApp | |
// | |
// Copyright (c) 2013 indoo.rs GmbH. All rights reserved. | |
// | |
#import "IDViewController.h" | |
#import <CoreLocation/CoreLocation.h> |
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/sh | |
# | |
# Copyright (C) 2010 The Android Open Source Project | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
#replace count=1024 with the number of MB (!) you want to grow the image file | |
dd if=/dev/zero bs=1024k count=1024 >> my_loop_image_file | |
e2fsck -f my_loop_image_file | |
resize2fs my_loop_image_file |
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
std::cout << "debug message: " << array.size() << std::endl; |
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
InputStream stream = getServletContext().getResourceAsStream("/WEB-INF/file.txt"); |
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
<!-- ... --> | |
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> | |
<!-- ... --> |