Skip to content

Instantly share code, notes, and snippets.

View drazisil's full-sized avatar
💭
Always Online - Somewhere

Molly Crendraven drazisil

💭
Always Online - Somewhere
View GitHub Profile
@drazisil
drazisil / log4j_minecraft.xml
Created April 2, 2020 19:14
My modified log4j config file for troubleshooting Minecraft, as of 1.15.2
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="com.mojang.util">
<Appenders>
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss.SSS}] [%t/%level]: %msg%n" />
</Console>
<Queue name="ServerGuiConsole">
<PatternLayout pattern="[%d{HH:mm:ss.SSS} %level]: %msg%n" />
</Queue>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
@drazisil
drazisil / log4j2.xml
Created April 2, 2020 18:41
The default log4j configuration file for Minecraft, as of 1.14
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="com.mojang.util">
<Appenders>
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
</Console>
<Queue name="ServerGuiConsole">
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
</Queue>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
const result = await superagent
.put(`${putURL}`)
.send(uploadFile) // sends a JSON post body
.set("Content-Type", "application/x-gzip")
.set("Content-Encoding", "gzip")
.set("x-amz-acl", "public-read")
.set("Content-Length", Buffer.byteLength(uploadFile));
npx lockfile-lint --path npm-shrinkwrap.json --allowed-hosts npm yarn --validate-https
npx: installed 33 in 2.348s
ABORTING lockfile lint process due to error exceptions
Unable to find relevant lockfile parser for "npm-shrinkwrap.json", consider passing the --type option.
Error
at new ParsingError (/home/drazisil/.npm/_npx/12990/lib/node_modules/lockfile-lint/node_modules/lockfile-lint-api/src/common/ParsingError.js:27:33)
at ParseLockfile.parseSync (/home/drazisil/.npm/_npx/12990/lib/node_modules/lockfile-lint/node_modules/lockfile-lint-api/src/ParseLockfile.js:53:13)
@drazisil
drazisil / config.yml
Created April 9, 2019 11:15 — forked from lokst/config.yml
Sample steps to manually update Xcode to latest 10.2 version (not necessary once the Xcode 10.2 GA version image has been released on CircleCI)
version: 2
jobs:
build:
macos:
xcode: "10.2.0"
steps:
- run:
name: Update Xcode to latest 10.2 version
command: |
# Requires setting the XCODE_INSTALL_USER and XCODE_INSTALL_PASSWORD
@drazisil
drazisil / 0_README.md
Last active March 30, 2023 10:41
Example code using react-filepond and multer to upload files to a server
import React, { Component } from "react";
import agent from "superagent";
import classNames from "classnames";
import logo from "./logo.svg";
import "./Gallery.css";
import ImageList from "./Components/ImageList";
import { FilePond } from "react-filepond";
export default class Gallery extends Component {
constructor() {
import React, { Component } from "react";
import uniqueString from "unique-string";
import agent from "superagent";
import classNames from "classnames";
import logo from "./logo.svg";
import "./Gallery.css";
import ImageList from "./Components/ImageList";
import image1 from "./images/img1.jpeg";
import image2 from "./images/img2.jpeg";
import image3 from "./images/img3.jpeg";
import React, { Component } from "react";
import css from "./assets/css/style.css";
import img1 from "./assets/images/img1.jpeg";
import img2 from "./assets/images/img2.jpeg";
import img3 from "./assets/images/img3.jpeg";
import img4 from "./assets/images/img4.jpeg";
import AddImage from "./AddImage";
export default class Gallery extends Component {
constructor() {
const opacity = 0.4;
const current = document.querySelector("#current");
const [maxHeight, maxWidth] = [current.height, current.width];
const imgs = document.querySelectorAll(".imgs img");
imgs[0].style.opacity = opacity;