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
| #!/bin/bash | |
| bucket_name="my-unique-name" | |
| aws s3api create-bucket --bucket "${bucket_name}" > /dev/null # 1 | |
| aws s3api put-public-access-block --bucket "${bucket_name}" --public-access-block-configuration "BlockPublicPolicy=false" # 2 | |
| aws s3api put-bucket-policy --bucket "${bucket_name}" --policy '{ | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "PublicReadGetObject", |
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
| [ | |
| { "keys": ["alt+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} }, | |
| { "keys": ["ctrl+k","ctrl+a"], "command": "select_all" }, | |
| { "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} }, | |
| { "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} }, | |
| { "keys": ["shift+right"], "command": "lsp_symbol_definition", | |
| "args": {"side_by_side": false, "force_group": true, "fallback": false, "group": -1}, | |
| "context": [ | |
| {"key": "lsp.session_with_capability", "operand": "definitionProvider"}, | |
| {"key": "auto_complete_visible", "operand": 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
| # Editor Config | |
| theme = "catppuccin_macchiato" | |
| [editor] | |
| scrolloff = 6 | |
| mouse = true | |
| middle-click-paste = true | |
| scroll-lines = 3 | |
| shell = [ "zsh","-c" ] | |
| line-number = "absolute" |
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 time | |
| time_ns = time.monotonic_ns() |
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
| {"data":"<much wow=\"xml\"/>","device_id":3,"device_type":"accelerometer","id":0,"timestamp":"2017-05-31T04:10:48+0000"} | |
| {"data":{"appinfoA":"abc","appinfoB":123,"appinfoC":true},"device_id":1,"device_type":"temperature","id":1,"timestamp":"2013-07-17T23:18:51+0000"} | |
| {"data":1.5,"device_id":1,"device_type":"flow","id":2,"timestamp":"2013-04-26T07:34:51+0000"} | |
| {"data":"I'm just a string","device_id":3,"device_type":"accelerometer","id":3,"timestamp":"2001-10-01T22:52:57+0000"} | |
| {"data":"eyAieHl6IjogMTIzIH0=","device_id":1,"device_type":"temperature","id":4,"timestamp":"2005-01-01T09:05:50+0000"} | |
| {"data":"<much wow=\"xml\"/>","device_id":1,"device_type":"flow","id":5,"timestamp":"2012-09-08T19:14:16+0000"} | |
| {"data":{"appinfoA":"abc","appinfoB":123,"appinfoC":true},"device_id":3,"device_type":"accelerometer","id":6,"timestamp":"2003-09-26T07:22:09+0000"} | |
| {"data":1.5,"device_id":1,"device_type":"temperature","id":7,"timestamp":"2000-05-11T21:20:53+0000"} | |
| {"data":"I'm just a string","device_id":1,"device_type":"flow |
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
| #![allow(unused)] // silence unused warnings while exploring (to comment out) | |
| use std::{error::Error, str}; | |
| use s3::bucket::Bucket; | |
| use s3::creds::Credentials; | |
| use s3::region::Region; | |
| use s3::BucketConfiguration; | |
| // Youtube Walkthrough - https://youtu.be/uQKBW8ZgYB8 |
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 requests | |
| from datetime import datetime | |
| import time | |
| import os | |
| github_token = os.getenv('GITHUB_TOKEN') | |
| real_requests_post = requests.post | |
| def wrap_requests_post(*args, **kwargs): |
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
| # github生成的两把钥匙 | |
| client_id = 'e3a53e8921975c37fe3d' | |
| client_secret = '739a252f5022855aadcc832a2facd86b1b836ef6' | |
| from flask import Flask, \ | |
| redirect, \ | |
| jsonify | |
| from furl import furl | |
| import requests | |
| import json | |
| from flask import request |
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
| config: | |
| aws:region: us-east-2 | |
| my-project:HASURA_GRAPHQL_DATABASE_URL: | |
| secure: <snipped> |