Skip to content

Instantly share code, notes, and snippets.

View zyuiop's full-sized avatar

Louis Vialar zyuiop

  • Lausanne, Switzerland
View GitHub Profile
word = input("Expression > ")
step = int(input("Decallage > "))
word = word[::-1] # Reverse letters order
def decryptLetter(letter, key):
pos = ord(letter)
upBound, downBound = 0, 0
if pos >= 97 and pos <= 122:
import java.util.*;
/**
* @author zyuiop
*/
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Map seed : ");
long seed = scanner.nextLong();
import java.util.Random;
import java.util.Scanner;
/**
* @author zyuiop
*/
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Map seed : ");
@zyuiop
zyuiop / upload.sh
Created October 16, 2015 23:19
Upload a file to a VPS with a random name
#!/bin/bash
fileName=$1
targetName=$(date +%s | sha256sum | base64 | head -c 8)
file=$(basename "$fileName")
extension="${file##*.}"
scp $fileName vps:~/screenshots/$targetName"."$extension
echo "http://i.zyuiop.net/"$targetName"."$extension | xclip -selection c
echo "Uploaded "$targetName"."$extension" ! URL copied to clipboard."
@zyuiop
zyuiop / TetraHexaDecaunalInteger.java
Last active October 11, 2015 14:06
Because we all want to count in base 42.
import java.util.Arrays;
import java.util.List;
/**
* @author zyuiop
*/
public class TetraHexaDecaunalInteger {
private int[] factors;
private List<Character> characters = Arrays.asList('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F');
import time
import mcstatus
import json
from os import path
import shutil
import sys
import datetime
PATH = path.dirname(path.abspath(__file__))
PINGS_PATH = PATH + "/pings.txt"
@zyuiop
zyuiop / README.MD
Last active April 2, 2023 11:40
A simple tool to manage scoreboards in minecraft (lines up to 48 characters !). /

About

This class allow you to use a scoreboard as a sign in which you can write any text. It is designed to be used with a CraftBukkit server (or any similar variant). It uses fake teams to allow lines that are longer than usernames.

Other versions

@zyuiop
zyuiop / Example.java
Created August 8, 2015 15:25
Blocking world downloader
class Example extends JavaPlugin {
public void onEnable() {
Bukkit.getMessenger().registerOutgoingPluginChannel(this, "WDL|CONTROL");
Bukkit.getMessenger().registerIncomingPluginChannel(this, "WDL|INIT", (s, player, bytes) -> {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeInt(1);
out.writeBoolean(false);
out.writeInt(1);
out.writeBoolean(false);
out.writeBoolean(false);