Skip to content

Instantly share code, notes, and snippets.

View mbround18's full-sized avatar
😍
Designing

Michael mbround18

😍
Designing
View GitHub Profile
package filepackage;
import java.io.*;
public class FileWritingStreamWay {
public static void main(String[] args) {
InputStream istream;
OutputStream ostream=null;
int c;
final int EOF = -1;
istream = System.in;
File outFile = new File("Data.txt");
@mbround18
mbround18 / error.ts
Last active January 2, 2020 19:25
Extendable custom errors for Typescript.
class CustomError extends Error {
public name = this.constructor.name;
constructor(message?: string, opts?: { name?: string }) {
super(message); // 'Error' breaks prototype chain here
Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain
}
}
// tslint:disable-next-line: max-classes-per-file
class SuperBadError extends CustomError {

yarn berry gitignore

So to summarize:

If you're using Zero-Installs:

.yarn/unplugged
.yarn/build-state.yml
export default function () {
return {
async reportTaskStart (/* startTime, userAgents, testCount */) {
throw new Error('Not implemented');
},
async reportFixtureStart (/* name, path, meta */) {
throw new Error('Not implemented');
},
const name = "deep";
const greeting = `Hello, ${name}`;
console.log(greeting);
#!/bin/bash
useradd -rm -s /bin/bash ansible
mkdir --parent /home/ansible/.ssh
touch /home/ansible/.ssh/authorized_keys
echo "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIqedbDxKmTJL0D2f7r6U82ouzwyZEsrYxlETlqjRHhg8zUXRTqTns769og99xk5oNgi/heOGCHiLX2BQ5GVF9M= ansible@salt-master-01" > /home/ansible/.ssh/authorized_keys
chown ansible -R /home/ansible/.ssh
@mbround18
mbround18 / GameUserSettings.ini
Last active April 26, 2020 00:29
Tallonted Ark Server GameUserSettings.ini
[ServerSettings]
allowThirdPersonPlayer=1
AllowCaveBuildingPvE=1
alwaysNotifyPlayerJoined=0
alwaysNotifyPlayerLeft=0
bAllowFlyerCarryPvE=1
bDisableStructureDecayPvE=0
DayCycleSpeedScale=1.00000
DayTimeSpeedScale=1.38015
NightTimeSpeedScale=1.23971
#--------------------------------------------------------------------------------------------------------------------------------- #
# . . | ,---.
# | |,---.,---.,---. ,---.,---.|__/ ,-.-.,---.,---.,---.,---.,---.,---. ,---.|__. ,---.
# | |`---.|---'| ,---|| | \ | | |,---|| |,---|| ||---'| | | | |
# `---'`---'`---'` `---^` ` `` ' '`---^` '`---^`---|`---'` o`---'` `---|
# `---' `---'                                                                                                                                 
#--------------------------------------------------------------------------------------------------------------------------------- #
#--------------------------------
@mbround18
mbround18 / derp.md
Created May 1, 2020 06:16
ark-server-info derp

@mbround18
mbround18 / provider.tf
Created June 25, 2020 18:14
Dynamic switch to localstack
provider "aws" {
region = var.aws_region
s3_force_path_style = var.use_localstack
skip_credentials_validation = var.use_localstack
skip_metadata_api_check = var.use_localstack
# Note: all services are now exposed via a single edge port: https://github.com/localstack/localstack
dynamic "endpoints" {
for_each = var.use_localstack ? [var.localstack_host] : []