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
| from base64 import b64encode | |
| from hashlib import sha256 | |
| from hmac import new | |
| from flask import Flask, request, jsonify | |
| CONSUMER_SECRET = '' | |
| app = Flask(__name__) |
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
| from requests import post | |
| CONSUMER_KEY = '' | |
| CONSUMER_SECRET = '' | |
| r = post('https://api.twitter.com/oauth2/token?grant_type=client_credentials', | |
| auth=(CONSUMER_KEY, CONSUMER_SECRET)) | |
| try: |
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
| start chrome --start-maximized 172.16.16.254:8000 |
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
| import { initializeApp } from 'firebase/app'; | |
| import { getAuth, GoogleAuthProvider, signInWithCredential } from 'firebase/auth'; | |
| import { | |
| getFirestore, doc, updateDoc, getDoc, | |
| } from 'firebase/firestore'; | |
| // get it from firebase.bangkit.conf.ts | |
| const config = {}; | |
| const app = initializeApp(config); |
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
| Connect-AzAccount -Identity | |
| function CheckAndStartVM { | |
| param ( | |
| [string] $ResourceGroupName, | |
| [string] $VMName | |
| ) | |
| $vm = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $VMName -Status |