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
/** | |
* Parse an aberration of a number | |
* | |
* @author Noah Halstead <[email protected]> | |
* @param {string} value Abbreviated Number | |
* @return {number} amount | |
*/ | |
function unabbreviateNumber(value = "") { | |
value = value.toLowerCase().replace(/,/g, "") |
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 | |
docker run -d --net=host \ | |
--restart=always \ | |
--label stack.application=airconnect \ | |
--label stack.category=audio \ | |
--label stack.type=p2p-bridge \ | |
--hostname airconnect \ | |
--name airconnect \ | |
1activegeek/airconnect |
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
var params = location.search | |
.substr(1) | |
.split("&") | |
.reduce(function(params, param) { | |
params[param.split('=')[0]] = decodeURIComponent(param.split('=')[1]) | |
return params | |
}, {}) | |
document.getElementById('email').textContent = params['email'] |
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 | |
# Update Deja Dup Backup Exclude Config for the node_modules folders. | |
# This will only auto exclude if a package.json file and a .git folder exist. | |
# This also will update the list for excluding backups of vendor <composer> folders. | |
if [[ ! -x "$(command -v yq)" ]]; then | |
echo "'yq' is required. Please install 'yq'. Try 'snap install yq'" | |
exit 1; | |
fi |
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
<?php | |
namespace App\Traits; | |
/** | |
* This is a copy of code from Illuminate\Database\Eloquent\Model | |
* that allows traits to be booted and initialized. | |
* | |
* These functions are on the trait its self and allow for an initialization | |
* to take place. |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: my-laravel-env-vars | |
namespace: default | |
data: | |
APP_KEY: xyz | |
APP_URL: https://example.com |
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
const insertFill = function (arr, index, item, fillValue = 0) { | |
if (arr.length === 0 && index === 0) return [item]; | |
if (arr.length < index) { | |
// Index is not found, Fill in the length needed. | |
const missing = index - arr.length; | |
const fill = Array(missing - 1).fill(fillValue); | |
arr = arr.concat(fill); | |
return arr.concat([item]); | |
} | |
// The Index exists, insert at that point. |
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
# Bash Functions to load into the shell environment | |
alias chmox="chmod +x" | |
alias claer="clear" | |
alias exiut="exit" | |
alias exuit="exit" |
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 python | |
import os | |
import sys | |
import time | |
dataIn = float(sys.stdin.read()) | |
os.utime(sys.argv[1], (dataIn, dataIn)) |
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
<?php | |
require_once("reorder.php"); | |
/** | |
* This is just an element to hold the data, | |
* you can use any thing as long as the function | |
* knows where to get the order and an ID. | |
*/ | |
class Element { |