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 MAPBOX_ACCESS_TOKEN = "12346789" | |
| interface UrlObject { | |
| protocol: string; | |
| authority: string; | |
| path: string; | |
| params: string[]; | |
| } | |
| export function isMapboxURL(url: string) { |
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
| # Title: Duck's Light | |
| # Description: Size-optimised version. | |
| # Expires: 1 month | |
| # Last modified: 24 Aug 2025 00:00 UTC | |
| # Version: 2025.8.1 | |
| # Syntax: Domains (including possible subdomains) | |
| # Number of entries: 308 | |
| # | |
| mobile.events.data.microsoft.com | |
| browser-intake-datadoghq.com |
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
| 11-22 |
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
| setInterval(function() { | |
| document.querySelector(".notion-sidebar-trash-menu> div:nth-child(2) > div > div > div > div > div:nth-child(3) > div > div:nth-child(2)").click(); | |
| setTimeout(function() { | |
| let deleteButton = document.querySelector("[role='dialog'] [role='menu'] > div > [role='button']"); | |
| if (deleteButton && deleteButton.textContent.includes("Delete")) { | |
| deleteButton.click() | |
| }; | |
| }, 500) | |
| }, 2000 | |
| ) |
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
| "comment" = { fg = "comment" } | |
| "constant" = { fg = "purple" } | |
| "constant.character.escape" = { fg = "pink" } | |
| "function" = { fg = "green" } | |
| "keyword" = { fg = "pink" } | |
| "operator" = { fg = "pink" } | |
| "punctuation" = { fg = "foreground" } | |
| "string" = { fg = "yellow" } | |
| "string.regexp" = { fg = "red" } | |
| "tag" = { fg = "pink" } |
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
| def get_pois_from_amadues_task(): | |
| """Get POIs from Amadeus.""" | |
| if cache.get("get_pois_from_amadues_task"): | |
| return | |
| else: | |
| # Time out in 24 hours | |
| cache.set("get_pois_from_amadues_task", True, timeout=3600 * 24) | |
| # Get geocoding object with user location and no point of interest | |
| # or user location and number of downloaded iterm is smaller than total number of item |
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
| ping -c4 192.168.1.1 > /dev/null | |
| if [ $? != 0 ] | |
| then | |
| sudo ifconfig wlan0 down | |
| sleep 5 | |
| sudo ifconfig wlan0 up | |
| fi |
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 datetime import datetime | |
| class Person: | |
| def __init__(self, n, dob): | |
| self.name = n | |
| self.date_of_birth = dob | |
| def age(self): | |
| return (datetime.now() - self.date_of_birth).days / 365 | |
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
| class HinhChuNhat: | |
| def __init__(self, d, r): | |
| """ | |
| các object được tạo từ class `HinhChuNhat` sẽ có 2 thuộc tính | |
| là `dai` và `rong`. | |
| """ | |
| self.dai = d | |
| self.rong = r | |
| def dientich(self): |
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
| # Thêm hàm sqrt, căng bật hai của một số từ thư viện `math`. | |
| from math import sqrt | |
| # `HinhVuong(object)` có nghĩa là class hình vuông thừa hưởng các thuộc tính từ class | |
| class HinhVuong: | |
| def __init__(self, a): | |
| self.canh = a | |
| def can_hold (self, other): | |
| """ | |
| Kiểm tra xem hình vuông đang xét (self) có thể chứa hình vuông hoặc tròn khác (other) hay không? |
NewerOlder