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
rules_version = '2'; | |
service firebase.storage { | |
match /b/{bucket}/o { | |
function isSignedIn() { | |
return request.auth != null; | |
} | |
function isUser(userId) { | |
return request.auth.uid == userId; | |
} |
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 firebase_admin | |
from firebase_admin import firestore, storage | |
from flask import abort | |
from google.cloud.firestore_v1.base_document import DocumentSnapshot | |
import app.config | |
firebase_app = firebase_admin.initialize_app(options={"storageBucket": app.config.FIREBASE_STORAGE_BUCKET}) | |
bucket = storage.bucket() | |
db = firestore.client() |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <ogg/ogg.h> | |
#include <opus/opus.h> | |
#define SAMPLE_RATE_HZ 48000 | |
#define CHANNELS 1 | |
#define MAX_PACKET_SIZE 2048 |
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
dataLayer.push({ | |
'event': 'Docs Copy To Clipboard With Keyboard', | |
'eventCallback': function() { | |
document.addEventListener('copy', function(e) { | |
dataLayer.push({ | |
'event': 'Docs Copy To Clipboard With Keyboard' | |
}); | |
}); | |
} | |
}); |
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
flowchart TD | |
User@{ shape: manual-input, label: "User"} -->|GET| App{Your Application} | |
App -->|Context + Flag Key| LDClient[LaunchDarkly SDK Client] | |
LDClient -->|get flag value| LDServer[LaunchDarkly Service] | |
LDServer -->|receive flag value| LDClient | |
LDClient -->|flag value| App | |
App -->|Delivers user experience| User |
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 ldclient | |
from ldclient.config import Config | |
from ldclient import Context | |
ldclient.set_config(Config('sdk-copy-your-sdk-key-here')) | |
client = ldclient.get() | |
if __name__ == "__main__": | |
alice = Context.builder('user-id-123abc1').kind('user').name('Alice').set('email', '[email protected]').build() |
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 ldclient | |
from ldclient.config import Config | |
from ldclient import Context | |
# Import your application | |
from yourapp import App | |
# Instantiate your application | |
app = 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
import ldclient | |
from ldclient.config import Config | |
from ldclient import Context | |
ldclient.set_config(Config('sdk-copy-your-key-here')) | |
client = ldclient.get() | |
if __name__ == "__main__": | |
if client.is_initialized(): |
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 ldclient | |
from ldclient.config import Config | |
from ldclient import Context | |
ldclient.set_config(Config('sdk-copy-your-key-here')) | |
client = ldclient.get() | |
if __name__ == "__main__": | |
if client.is_initialized(): |
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 ldclient | |
from ldclient.config import Config | |
from ldclient import Context | |
ldclient.set_config(Config('sdk-copy-your-key-here')) | |
client = ldclient.get() | |
if __name__ == "__main__": | |
if client.is_initialized(): |
NewerOlder