Discover gists
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 SwiftUI | |
| import UIKit | |
| import CropViewController | |
| /// Wrapper around third party `CropViewController` to make it available in `SwiftUI`'s world. | |
| /// | |
| /// Usually, used after the selecting an image with `PHImagePicker` or `UIImagePicker` | |
| /// but before the uploading to the server. | |
| /// During the cropping, has strict aspect ratio of 3:4 (aka slightly vertical image). | |
| /// Plus rotating left/right functionality. |
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
| # WARNING: This will delete all your topics and kafka storage | |
| # Generate UUID | |
| export KAFKA_CLUSTER_ID=`kafka-storage.sh random-uuid` | |
| # Format storage | |
| kafka-storage.sh format -t $KAFKA_CLUSTER_ID -c ~/Software/kafka_2.13-4.0.0/config/server.properties | |
| # Start Server | |
| kafka-server-start.sh ~/Software/kafka_2.13-4.0.0/config/server.properties |
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
| <!DOCTYPE html> | |
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Rapport de Vente Dynamique</title> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap'); |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Code Editor</title> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | |
| integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous" /> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.css"> |
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 SwiftUI | |
| struct BrandedSegmentedPicker<T: Hashable & Identifiable & CustomStringConvertible>: View { | |
| // MARK: - Members | |
| var selection: Binding<T> | |
| var options: [(option: T, badge: Int?)] | |
| var selectionBgColor = Color(.systemBackground) | |
| var bgColor = Color.orange.opacity(0.5) | |
| var borderWidth: CGFloat = 2 | |
| var buttonEdgeInsets: EdgeInsets = .init(top: 6, leading: 10, bottom: 6, trailing: 10) |
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
| for container in $(docker ps --format '{{.Names}}'); do | |
| logpath=$(docker inspect --format='{{.LogPath}}' $container) | |
| if [ -f "$logpath" ]; then | |
| size=$(du -h "$logpath" | cut -f1) | |
| printf "%-30s %s\n" "$container" "$size" | |
| fi | |
| done |
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
| TransactionID | Date | AccountHolder | Type | Amount | Remarks | |
|---|---|---|---|---|---|---|
| TXN001 | 2024-01-05 | Arjun Mehta | Credit | 50000 | Monthly Salary for December | |
| TXN002 | 2024-01-08 | Arjun Mehta | Debit | 8000 | Utility Bill Payment | |
| TXN003 | 2024-01-12 | Priya Nair | Credit | 42000 | Salary for December | |
| TXN004 | 2024-01-13 | Priya Nair | Debit | 10000 | EMI Payment | |
| TXN005 | 2024-01-15 | Rahul Sharma | Credit | 55000 | Salary Transfer January | |
| TXN006 | 2024-01-17 | Rahul Sharma | Debit | 7000 | Shopping Expense | |
| TXN007 | 2024-01-18 | Kavya Iyer | Credit | 60000 | Monthly Salary | |
| TXN008 | 2024-01-19 | Kavya Iyer | Debit | 9000 | Travel Expense | |
| TXN009 | 2024-01-20 | Neha Patel | Credit | 48000 | Salary Payment |
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
| // t07e03.palindromePowers.cpp | |
| // juanfc 2025-10-28 | |
| // a version of palindromic numbers (capicúos in Spanish) | |
| // using powers of ten. Easier? | |
| // | |
| #include <iostream> | |
| using namespace std; | |
| // just to be able to enter longer integers |
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 | |
| import datetime | |
| import math | |
| from datetime import date | |
| from dateutil.relativedelta import relativedelta | |
| from odoo import fields, models, api, _ | |
| from odoo.exceptions import UserError, ValidationError | |
| from odoo.tools.safe_eval import safe_eval |
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
| 25-8587-MED | 10/28/2025 4:32:19 | MEDICAL EMERGENCY - UNCONSCIOUS PERSON | WITHHELD | Chichester, NH, USA |
NewerOlder