This file contains 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
<template> | |
<div class="code-editor" :style="{ width, height }"> | |
<div class="line-numbers" ref="lineNumbersRef"> | |
<span v-for="line in lineCount" :key="line">{{ line }}</span> | |
</div> | |
<pre | |
ref="editableCodeRef" | |
contenteditable="true" | |
@input="handleInput" | |
@scroll="syncScroll" |
This file contains 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
mysql9 mysql_native_password fix | |
code /usr/local/etc/my.cnf | |
```ini | |
[mysqld] | |
skip-grant-tables | |
``` |
This file contains 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
@Composable | |
private fun CuSwitch( | |
modifier: Modifier = Modifier, | |
checked: MutableState<Boolean> = remember { mutableStateOf(false) }, | |
onCheckedChange: (Boolean) -> Unit = {} | |
) { | |
val width = 34.dp | |
val height = 19.dp | |
val gapBetweenThumbAndTrackEdge = 2.dp |
This file contains 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 | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
# echo "Enter the first commit hash:" | |
# read commit1 | |
# echo "Enter the second commit hash:" | |
# read commit2 |
This file contains 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
/*! | |
* | |
* ap/v1.25.9 | |
* Mon Jun 20 2022 08:37:45 GMT+0000 (Coordinated Universal Time) | |
* | |
*/ | |
var myApp = (function (modules) { | |
var moduleCache = {}; | |
function require(moduleId) { |
This file contains 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 fs = require('fs') | |
const path = require('path') | |
function readDir(dir, extFilter) { | |
let fileList = [] | |
// Function to recursively read directories | |
function readDirectoryRecursive(directory) { | |
// Read the directory | |
fs.readdir(directory, (err, files) => { |
This file contains 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 | |
max_log_entries=30 | |
# Get the list of branches | |
branches=$(git for-each-ref --sort='-committerdate:iso8601' --format '%(refname:short)' refs/heads/) | |
# Display branch list for user selection | |
PS3="Select two branches for file changes: " |
This file contains 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 | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
# echo "Enter the first commit hash:" | |
# read commit1 | |
# echo "Enter the second commit hash:" | |
# read commit2 |
This file contains 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 | |
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
This file contains 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 fs = require('fs') | |
const path = require('path') | |
const https = require('https') | |
const url = require('url') | |
// Function to fetch a file from a server and save it locally | |
async function fetchAndSaveFile(url, localFilePath) { | |
// mkdir -p localFilePath | |
const dirname = path.dirname(localFilePath) | |
if (!fs.existsSync(dirname)) { |
NewerOlder