Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
California looks good on ya

Axel Rindle axelrindle

🌴
California looks good on ya
View GitHub Profile
@comp500
comp500 / fabricserversidemods.md
Last active Dec 14, 2022
Useful Fabric server side mods
@ruanbekker
ruanbekker / dnsmasq.conf
Last active Dec 9, 2022
Tinkering with Loki, Promtail, Grafana, Prometheus, Nginx and Dnsmasq
View dnsmasq.conf
log-queries
log-facility=/var/log/dnsmasq.log
no-resolv
server=8.8.4.4
server=8.8.8.8
address=/router/10.1.1.1
address=/server/10.1.1.2
View shitfuck.md

Communicating between the clients and the server

Experiment

Say you wanted to emit an explosion particle whenever your block is destroyed. Emitting particles requires access to the ParticleManager, which only exists on the MinecraftClient instance. Let's try doing that:

public class MyBlock extends Block {
    @Override
    public void onBlockRemoved(BlockState before, World world, BlockPos pos, BlockState after, boolean bool) {
@justincjahn
justincjahn / README.md
Last active Sep 7, 2022
Minecraft server(s) using systemd and screen.
View README.md

Install

# Install dependencies
sudo yum install -y java-1.8.0-openjdk screen

# Create a new unprivileged user for minecraft
useradd -r -m -d /opt/minecraft minecraft

# Create the directory that will house our minecraft instances

sudo su --shell /bin/bash minecraft

@ankurk91
ankurk91 / github_gpg_key.md
Last active Feb 1, 2023
Signing git commits using GPG (Ubuntu/Mac)
View github_gpg_key.md

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
View MutedVideoView.java
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.media.AudioManager;
import android.media.MediaFormat;
import android.media.MediaPlayer;
import android.net.Uri;
@beradrian
beradrian / ServletUtils.java
Last active May 13, 2021
Get baseUrl for a servlet request
View ServletUtils.java
String getBaseUrl(HttpServletRequest request) {
String baseUrl = request.getRequestURL().substring(0, request.getRequestURL().length() - request.getRequestURI().length()) + request.getContextPath();
return baseUrl;
}
@jbevain
jbevain / ReferenceRemovalProjectHook.cs
Created Nov 26, 2014
Project Generation Hook to remove references to Boo.Lang and UnityScript assemblies
View ReferenceRemovalProjectHook.cs
using System;
using UnityEngine;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
[InitializeOnLoad]
public class ReferenceRemovalProjectHook
{
@jeremeamia
jeremeamia / config.php
Last active Mar 26, 2016
Mini-PHP config system for fun. (MIT Licensed)
View config.php
<?php
namespace config;
const DELIM = '.';
/**
* Loads a configuration array from a file, based on it's type.
*
* @param string $path
@wikimatze
wikimatze / gist:9790374
Created Mar 26, 2014
Github Two-Factor Authentication Failed For HTTPS
View gist:9790374

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication