This file contains hidden or 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 com.test; | |
import java.io.IOException; | |
import java.net.Authenticator; | |
import java.net.InetSocketAddress; | |
import java.net.PasswordAuthentication; | |
import java.net.SocketAddress; | |
import com.google.api.client.http.HttpTransport; | |
//import com.google.api.client.http.apache.ApacheHttpTransport; |
This file contains hidden or 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 com.test; | |
import java.io.IOException; | |
import java.net.Authenticator; | |
import java.net.InetSocketAddress; | |
import java.net.PasswordAuthentication; | |
import java.net.SocketAddress; | |
import com.google.api.client.http.HttpTransport; | |
//import com.google.api.client.http.apache.ApacheHttpTransport; |
This file contains hidden or 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 ( | |
"log" | |
"cloud.google.com/go/pubsub" | |
"cloud.google.com/go/storage" | |
"golang.org/x/net/context" | |
"google.golang.org/api/iterator" | |
) |
This file contains hidden or 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
using System; | |
using Google.Cloud.Storage.V1; | |
using Google.Cloud.PubSub.V1; | |
using Google.Apis.Auth.OAuth2; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Google.Apis.Http; |
This file contains hidden or 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
using System; | |
using Google.Cloud.Storage.V1; | |
using Google.Cloud.PubSub.V1; | |
using Google.Apis.Auth.OAuth2; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Google.Apis.Http; |
This file contains hidden or 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 log4js = require("log4js"); | |
var logger = log4js.getLogger(); | |
const Pubsub = require('@google-cloud/pubsub'); | |
const Storage = require('@google-cloud/storage'); | |
/* | |
1. User auth | |
export https_proxy=http://localhost:3128 | |
auth N | |
gcs Y |
This file contains hidden or 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 | |
/* | |
echo 0a2d48656c6c6f20756e61727920525043206d736720202066726f6d20686f73746e616d6520737261736869643132 | xxd -r -p | protoc -I`pwd`/src/echo/ --decode=echo.EchoReply `pwd`/src/echo/echo.proto | |
message: "Hello unary RPC msg from hostname srashid12" | |
*/ |
This file contains hidden or 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 ( | |
"bufio" | |
"bytes" | |
"encoding/binary" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io" |
This file contains hidden or 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
const { GoogleAuth, OAuth2Client, Impersonated } = require('google-auth-library'); | |
const { Storage } = require('@google-cloud/storage'); | |
async function main() { | |
const scopes = 'https://www.googleapis.com/auth/cloud-platform' | |
// get source credentials |
This file contains hidden or 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 ( | |
"context" | |
"io/ioutil" | |
"net/http" | |
"log" | |
"golang.org/x/oauth2" |