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
function trimNewlinesAndSpaces(inputString: string | number) { | |
// Remove newlines and replace multiple spaces with a single space | |
if (typeof inputString === "string") { | |
return inputString.replace(/\n/g, '').replace(/ +/g, ' ').replace(/\,/g, ''); | |
} else { | |
return "" + inputString | |
} | |
} |
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
function trimNewlinesAndSpaces(inputString) { | |
// Remove newlines and replace multiple spaces with a single space | |
if (typeof inputString === "string") { | |
return inputString.replace(/\n/g, '').replace(/ +/g, ' ').replace(/\,/g, ''); | |
} else { | |
return "" + inputString | |
} | |
} | |
const flattenObj = (results, parentKey, obj) => { |
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
setopt localoptions rmstarsilent |
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
esto | |
es | |
una | |
prueba |
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
#!/usr/bin/python | |
"""Replacement for htpasswd""" | |
# Original author: Eli Carter | |
import os | |
import sys | |
import random | |
from optparse import OptionParser | |
# We need a crypt module, but Windows doesn't have one by default. Try to find |
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
@media screen and (max-width: 767px) { | |
table.table-magic { | |
border: 0; | |
} | |
table.table-magic thead { | |
display: none; | |
} | |
table.table-magic tr { | |
margin-bottom: 10px; | |
display: block; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script> | |
</head> | |
<body> |
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
defaults write com.apple.dock autohide-delay -float 0 ;killall Dock | |
defaults write com.apple.dock autohide-time-modifier -float 0; killall Dock |
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 crypto = require("crypto"); | |
const { subtle } = crypto.webcrypto; | |
const iv = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); // crypto.getRandomValues(new Uint8Array(12)); | |
const algorithm = { | |
iv, | |
name: "AES-GCM", | |
}; | |
function btoa(str) { |
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
/** | |
* Get a Google auth token given service user credentials. This function | |
* is a very slightly modified version of the one found at | |
* https://community.cloudflare.com/t/example-google-oauth-2-0-for-service-accounts-using-cf-worker/258220 | |
* | |
* @param {string} user the service user identity, typically of the | |
* form [user]@[project].iam.gserviceaccount.com | |
* @param {string} key the private key corresponding to user | |
* @param {string} scope the scopes to request for this token, a | |
* listing of available scopes is provided at |