Skip to content

Instantly share code, notes, and snippets.

public class Main {
static Output out = new Output();
public static void main(String[] args)
{
System.out.println(out.Shannon);
}
}
@Solonarv
Solonarv / Car.java
Last active January 23, 2017 22:42
public class Car {
public static List<Car> allCars = new LinkedList<Car>();
public final String manufacturer;
public final String model;
public final int buildYear;
public Car(String manu, String md, int year){
this.manufacturer = manu;
this.model = md;
public class Constants {
public static final double PI = 3.14159; // should have more digits, obviously
public static final double PHI = (Math.sqrt(5) - 1) / 2; // Exact value, or as close as we can get
public static final int ANSWER = 42; // or is it?
public static final int NUMBER_OF_GENDERS = Double.POSITIVE_INFINITY; // ;)
@Solonarv
Solonarv / cookie-clicker-efficiency.user.js
Created March 9, 2017 00:43
Cookie Efficiency Display userscript

ENLIGHTEN: QUALITY OR NO?

no quality ->	1.0 lvl3 per X atziris	costs 11c	90c sell	79c profit	79c	per X atziris
6% haku    ->	1.3 lvl3 per X atziris  costs 11c	90c sell	79c profit	103c	per X atziris
20% qual   -> 	2.0 lvl3 per X atziris	costs 33c	90c sell	57c profit	114c	per X atziris

20% + haku -> 2.3 lvl3 per X atziris costs 33c 90c sell 57c profit 131c per X atziris

@Solonarv
Solonarv / multiclip.ahk
Last active April 13, 2017 17:50
A simple AutoHotKey script to have multiple keyboards. Press Ctrl-C/X/V followed by any character to copy/cut/paste to/from that clipboard. Pressing space will access the system clipboard.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
$^c::
Input, clipID, BIL1T2
If clipID = " "
#!/bin/env runhaskell
{-# LANGUAGE ViewPatterns #-}
module Main where
import Test.QuickCheck
import qualified Data.Vector as V
import Data.Vector (Vector)
import Text.Read (readMaybe)
@Solonarv
Solonarv / meepmerp.user.js
Created June 3, 2017 08:45
MeepMerp sounds overlap fix
// ==UserScript==
// @name MeepMerp sound fix
// @version 0.1
// @description meepmerp sound overlap ;)
// @author Solonarv
// @match http://meepmerp.com/
// @grant none
// ==/UserScript==
(function() {
class Vector {
public final int dimensions;
public final double[] components;
public Vector(double... components){
this.dimensions = components.length;
this.components = components;
}
public Vector add(Vector other) throws UnequalDimensionsException {
module Main where
import Data.Time
import System.Environment
import System.Process
main = do
args <- getArgs
if (null args) then
putStrLn "Please specify a command to run!"