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
' | |
# File Replacement and Backup Script | |
This script is designed to search through files within a specified directory, replace occurrences of a search string with a replacement string, and backup the original files. | |
It will rename every instance of that string, found not only in the files themselves, but also in the filename and directory name. | |
## Features | |
- Searches for files containing a specific string. | |
- Replaces the found string with a new 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
#!/usr/bin/env python3 | |
import argparse | |
import os | |
import openai | |
from pprint import pprint | |
import os | |
from openai import OpenAI | |
from tqdm import tqdm |
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
{ | |
"expose.expose": { | |
"@xlink.href": "https://rest.sandbox-immobilienscout24.de/restapi/api/search/v1.0/expose/314747248", | |
"@id": "314747248", | |
"@modification": "2019-11-27T13:26:20.793Z", | |
"@creation": "2019-03-19T12:57:04.000+01:00", | |
"@publishDate": "2019-03-19T12:57:04.000+01:00", | |
"@contactFormType": "EMAIL", | |
"realEstate": { | |
"@xsi.type": "expose:ApartmentRent", |
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
public class CounterViewController: UIViewController { | |
@IBOutlet internal var counterButton: UIButton? | |
@IBOutlet internal var counterLabel: UILabel? | |
.... |
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 AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? = UIWindow(frame: UIScreen.main.bounds) | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
window?.rootViewController = CounterViewController() | |
window?.makeKeyAndVisible() | |
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 feed_pods | |
pod 'SVProgressHUD', SVProgressHUDVersion | |
pod 'RxSwift', RxSwiftVersion | |
pod 'RxCocoa', RxSwiftVersion | |
pod 'Shimmer', ShimmerVersion | |
end |
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 extract_pngs_from_ttf(): | |
with open('/System/Library/Fonts/Apple Color Emoji.ttc', 'rb') as ttf: | |
pos = 0 | |
png_seq = '\x89\x50\x4E\x47\x0D\x0A\x1A\x0A' | |
end_seq = '\x49\x45\x4E\x44' | |
byte = ttf.read(8) | |
current_png = None |
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
xcodebuild -workspace ImmoScoutWohnen.xcworkspace -scheme ImmoScout clean build OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" 2> warnings.txt | gawk '{ print strftime("%s: "), $0; fflush(); }' | tee build_output.txt |
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
# Hibernate SQL dialect | |
connection.dialect = org.hibernate.dialect.PostgreSQLDialect | |
# JDBC driver class | |
connection.driver_class = org.postgresql.Driver | |
# JDBC driver connection URL | |
connection.url = jdbc:postgresql://${RDS_HOSTNAME}:${RDS_PORT}/${RDS_DB_NAME} | |
# Database username |
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
BACKUP_DIR='_backup'; | |
FILE_LIST=`find . -type f -not -path "*$BACKUP_DIR*"` | |
mkdir -pv $BACKUP_DIR; | |
while IFS= read -r line | |
do | |
if [[ $line == *"$1"* ]]; then | |
newfile=`echo $line | sed "s%$1%$2%g"`; | |
mkdir -pv "`dirname "$newfile"`"; | |
echo "Copying $line to $newfile"; | |
cp "$line" "$newfile" 2> /dev/null; |
NewerOlder