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
/** | |
* # slang.i18n.js | |
* | |
* Author: Kevin P. (kevinpthorne) Thorne | |
* | |
* Makes Dart's [slang](https://pub.dev/packages/slang) i18n JSON files available to | |
* an HTML+JS frontend. Requires serving the JSON files as Flutter assets. Only provides | |
* basic find-and-replace functionality currently. | |
* | |
* ## Usage: |
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/sh | |
set -euo pipefail | |
IFS=$'\n\t' | |
if [ "$USER" != "root" ] | |
then | |
echo "Please run this as root or with sudo" | |
exit 2 | |
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
#!/bin/sh | |
openssl pkcs8 -nocrypt -in mykey.p8 -out mykey.pem | |
openssl x509 -in my.csr -out my.cer.pem -req -signkey mykey.pem | |
openssl pkcs12 -export -out my.cer.p12 -inkey mykey.pem -in my.cer.pem |
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
# nvidia-xconfig: X configuration file generated by nvidia-xconfig | |
# nvidia-xconfig: version 510.60.02 | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" 0 0 | |
Screen 1 "Screen1" | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" |
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
Connect-VIServer -Server myServer -User vsphere.local\administrator -Password myPassword | |
Get-VM | Where-Object {$_.PowerState -eq "PoweredOn"} | Get-VMGuest | Format-Table VM, IPAddress |
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
Function CreateStudentServers { | |
PARAM ( | |
[Parameter(Mandatory=$true, Position=0, HelpMessage="Enter vCenter server IP address or hostname")] | |
[string]$vCenterAddress, | |
[Parameter(Mandatory=$true, Position=1, HelpMessage="Enter vCenter username [vsphere.local\administrator]")] | |
[string]$vCenterUser="vsphere.local\administrator", | |
[Parameter(Mandatory=$true, Position=2, HelpMessage="Enter vCenter password")] | |
[string]$vCenterPassword, | |
[Parameter(Mandatory=$true, Position=3, HelpMessage="Enter ESXi host IP address or hostname to host virtual servers")] | |
[string]$ESXiAddress, |
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
# under cron.weekly: /path/to/python3.6 /path/to/cloudflare-dynamic-dns.py >> /var/log/dynamic-dns.log 2>&1 | |
import requests | |
import os | |
import json | |
import logging | |
logging.basicConfig( | |
format='%(asctime)s %(levelname)-8s %(message)s', | |
level=logging.INFO, |
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 sorters; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
public class BucketSort extends IntSorter { | |
public BucketSort(ArrayList<Integer> arrayList, boolean ascending) { | |
super(arrayList, ascending); | |
} |