Skip to content

Instantly share code, notes, and snippets.

View cool-mist's full-sized avatar
🌀

Surya Prakash cool-mist

🌀
View GitHub Profile
@cool-mist
cool-mist / AdlsSdkFlush.cs
Created April 2, 2024 18:15
A repro for how Flush operation fails in ADLS sdk when using non-standard transports
using Azure;
using Azure.Core.Pipeline;
using Azure.Identity;
using Azure.Storage.Files.DataLake;
using Azure.Storage.Files.DataLake.Models;
namespace adlspatch
{
internal class Program
{
@cool-mist
cool-mist / DeleteAdlsDirectory.cs
Created April 1, 2024 09:59
Attempting to delete an ADLS directory with a large number of files, to see garbage collector behavior
// Target Framework: net8.0
// Dependencies:
// <PackageReference Include="Azure.Storage.Files.DataLake" Version="12.17.1" />
// <PackageReference Include="Azure.Identity" Version="1.10.4" />
// This is a a supporting gist for the github issue https://github.com/Azure/azure-sdk-for-net/issues/42981
using System.Diagnostics;
using Azure;
using Azure.Identity;
using Azure.Storage.Files.DataLake;
@cool-mist
cool-mist / MinecraftDyesOrder.md
Last active May 9, 2021 14:37
Order of dyes in a wool farm in minecraft

https://i.imgur.com/SAuKlS0.png

Colors sorted from here

https://i.imgur.com/zwOZHVV.png

Raw materials chart taken from reddit.

@cool-mist
cool-mist / gradle_build.log
Created January 1, 2021 08:43
Minecraft Forge gradle build error
$> gradlew build
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.10.3/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
> Configure project :
Java: 9.0.1 JVM: 9.0.1+11(Oracle Corporation) Arch: amd64
New Dep: net.minecraftforge:forge:1.16.4-35.1.28_mapped_snapshot_20201028-1.16.3
@cool-mist
cool-mist / NginxConfMinecraftRcon
Created December 26, 2020 14:56
Hosting Minecraft with rcon-web behind nginx with SSL
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
@cool-mist
cool-mist / BackupMinecraft.sh
Last active December 26, 2020 14:57
Backup minecraft world and clear stale backups
#!/bin/bash
DATE=`date`
BASE_DIR="{set-a-base-dir}"
FOLDER_TO_COMPRESS="$BASE_DIR/minecraft"
BACKUPS_FOLDER="$BASE_DIR/backups"
FILE_NAME_FORMAT=`date +"%Y-%h-%d_%H-%M"`
TAR_FILE="$BACKUPS_FOLDER/$FILE_NAME_FORMAT.tar.gz"
@cool-mist
cool-mist / gist:9663a14d0821211b34b7e5f970f6f4e4
Created December 10, 2020 15:26
Nginx configuration for Jekyll blog
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
@cool-mist
cool-mist / git-maven-howto.md
Last active April 27, 2020 07:30 — forked from fernandezpablo85/git-maven-howto.md
how to create your own maven repository on github

How to create a maven repository for your github project step by step

Clone your project in a separate folder

(note: replace ORGANIZATION and PROJECT)

git clone git@github.com:ORGANIZATION/PROJECT.git my-repository

Cd into it

@cool-mist
cool-mist / pygame_template.py
Last active February 5, 2016 20:06
Template for a pygame project. Tested in python 3.5
import pygame
# colors
WHITE = (255,255,255)
BLACK = (0,0,0)
RED = (255,0,0)
GREEN = (0,255,0)
BLUE = (0,0,255)
# Project Properties
@cool-mist
cool-mist / reverseNum.py
Created July 4, 2013 12:29
To reverse a number in python
def rev(num):
return int(str(num)[::-1])