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 | |
# Set backup directory | |
BACKUP_DIR="$(pwd)/Backup" | |
SSH_BACKUP_DIR="$BACKUP_DIR/ssh" | |
CONFIG_BACKUP_DIR="$BACKUP_DIR/config" | |
ZSH_BACKUP_DIR="$BACKUP_DIR/zsh" | |
echo "🔄 Starting restore..." |
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 | |
# Set backup directory | |
BACKUP_DIR="$(pwd)/Backup" | |
SSH_BACKUP_DIR="$BACKUP_DIR/ssh" | |
CONFIG_BACKUP_DIR="$BACKUP_DIR/config" | |
ZSH_BACKUP_DIR="$BACKUP_DIR/zsh" | |
echo "🔄 Starting backup..." |
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 os | |
import shutil | |
# Set your base folder here | |
base_folder = "/path/to/target/folder" | |
# Walk through all subdirectories (bottom-up to safely remove them) | |
for root, dirs, files in os.walk(base_folder, topdown=False): | |
for file in files: | |
# Skip hidden/system files |
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 os | |
import shutil | |
import re | |
from collections import defaultdict | |
from datetime import datetime | |
# === CONFIG === | |
scan_folder = "path/to/target/folder" # ← change this to your target folder | |
duplicate_target = os.path.join(os.getcwd(), "Duplicated") |
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 os | |
import shutil | |
import re | |
from datetime import datetime | |
# Set your folder path | |
folder_path = "path/to/target/folder" | |
# Date patterns to extract from filenames | |
patterns = [ |
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
package com.facebook | |
object AccessTokenCreator { | |
fun createToken(grantedPermissions: Collection<String?>?): AccessToken? { | |
return AccessToken("token", "appId", "userId", grantedPermissions, | |
ArrayList<String>(), null, AccessTokenSource.WEB_VIEW, null, null, null) | |
} | |
} |
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 java.math.BigDecimal | |
import java.text.SimpleDateFormat | |
import java.util.* | |
abstract class Benchmark(internal val name: String) { | |
@Throws(Throwable::class) | |
internal abstract fun run(iterations: Int) | |
private fun time(): BigDecimal { |
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 com.google.gson.TypeAdapter | |
import com.google.gson.stream.JsonReader | |
import com.google.gson.stream.JsonToken | |
import com.google.gson.stream.JsonWriter | |
import java.io.IOException | |
class MutableListTypeAdapter<T>(private val delegate: TypeAdapter<MutableList<T>>?) : TypeAdapter<MutableList<T>>() { | |
@Throws(IOException::class) | |
override fun write(out: JsonWriter?, value: MutableList<T>?) { |