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
# Note: | |
# | |
# Only hosting and functions are getting deployed in this | |
# script you should only deploy whole firebase project, | |
# If you are maintaining local copy of indexes and rules. | |
# | |
# Assuming that you have functions folder in your roote folder. | |
# | |
# This pipe line reads credentials from the gitlab envrioment. | |
# https://docs.gitlab.com/ee/ci/variables/README.html#create-a-custom-variable-in-the-ui |
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
documentMap.toArray().map((msg) => { | |
// msg[0] is key | |
// msg[1] is element at key | |
console.log(msg[0],msg[1]) | |
return | |
} |
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 { OrderedMap } = require('immutable'); | |
var documentMap = OrderedMap() | |
const messageListner = () => { | |
let unsubscribe = database | |
.collection('documents') | |
.orderBy('created_at', 'asc') | |
.limitToLast(10) | |
.onSnapshot(async (snap) => { | |
for (let msg of snap.docs) { |
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
#include <Cocoa/Cocoa.h> | |
extern void ButtonClick(void); | |
@interface GoPasser : NSObject | |
+ (void)buttonClick:(id)sender; // this should call the cgo function defined in main.go | |
@end | |
void StartApp(void); |
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 | |
/* | |
#cgo CFLAGS: -x objective-c | |
#cgo LDFLAGS: -framework Cocoa | |
#import <Cocoa/Cocoa.h> | |
int | |
StartApp(void) { | |
[NSAutoreleasePool new]; |
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 "fmt" | |
func PadRight(str, pad string, lenght int) string { | |
for { | |
str += pad | |
if len(str) > lenght { | |
return str[0:lenght] | |
} |
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
# Managed dump script file is already provided | |
# by google to manage datastore dump | |
# I have just extended the same script to load | |
# dump to bigquery as soon as dumping opertion | |
# is successfully done | |
import datetime | |
import httplib | |
import json | |
import logging |
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
function storage_upload(filedata, filehandle, DropzoneHandle, cb) { | |
// Getting Handle of the progressbar element of current file // | |
var progressBar = filehandle.previewElement.children[2] | |
// Firestore storage task | |
var task | |
// uuid for file being uploaded | |
var uuid_string = uuid() |
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 myDropzone = new Dropzone("form#dropzone", { // Make the whole body a dropzone | |
url: '/', | |
addRemoveLinks: true, | |
method: 'put', | |
chunking: true, | |
forceChunking: true, | |
autoQueue: false, | |
autoProcessQueue: false | |
}); | |
myDropzone.autoDiscover = false; |
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
<html> | |
<head> | |
<head> | |
<title>Simple Calc</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
</head> | |
<body> | |
<label for="">Input First</label> |
NewerOlder