Skip to content

Instantly share code, notes, and snippets.

@Gimcrack
Gimcrack / .bash_aliases
Created August 29, 2023 07:40
Composer on windows, ignore laravel horizon missing extensions
alias cmp="composer --ignore-platform-req=ext-posix --ignore-platform-req=ext-pcntl"
@Gimcrack
Gimcrack / main.php
Created July 25, 2023 16:58
Get Products O(n)
<?php
$input = [-1,1,0,-3,3];
function getProducts(array $input) {
// initialize output array with 1s
$output = array_map(fn($el) => 1, $input);
$length = count($input);
// multiply each element by the elements before it
$temp=1;
@Gimcrack
Gimcrack / Win11ClassicContextMenu.reg
Created April 24, 2023 17:13
Windows 11 Classic Context Menu
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32]
@=""
@Gimcrack
Gimcrack / RecipeQA.md
Created February 11, 2022 07:13
Recipe QA

ALUMINUM_SCRAP has different rate for output C__ALUMINUM_SCRAP (300.0 vs 360.0) -- 360 is correct

BLACK_POWDER_ALT_FINE_BLACK_POWDER has different rate for output C__COMPACTED_COAL (3.75 vs 3.8) -- 3.75 is correct

COMPUTER_ALT_CATERIUM_COMPUTER has different rate for output C__CIRCUIT_BOARD (26.25 vs 26.3)

@Gimcrack
Gimcrack / RecipeSeeder.php
Created January 29, 2022 00:45
Recipe Seeder
<?php
class RecipeSeeder extends Seeder
{
protected $recipes = [
// alts done
// no byproducts
"Smelter" => [
"Iron Ingot" => [
"base_yield" => 1,
@Gimcrack
Gimcrack / bootstrap.js
Created December 9, 2020 20:26
Set up laravel-echo in bootstrap.js
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
import Echo from "laravel-echo"
window.Echo = new Echo({
broadcaster: 'socket.io',
@Gimcrack
Gimcrack / PapertrailFormatter.php
Created August 25, 2020 23:32
Papertrail Log Formatter
<?php
namespace App\Exceptions;
use Monolog\Formatter\LineFormatter;
class PapertrailFormatter extends LineFormatter {
public const SIMPLE_FORMAT = "%channel%.%level_name%: %message% %context% %extra%\n";
@Gimcrack
Gimcrack / TrelloScrumStyle.css
Created January 12, 2020 05:11
TrelloScrumStyle.css
/*========================================================
= Scrum for your Trello board =
==========================================================
@author: Vinícius Stutz
@site: http://www.vinicius-stutz.com/
@date: 7 jan 2016
*/
@Gimcrack
Gimcrack / wiki-100k.txt
Created October 12, 2019 19:48 — forked from h3xx/wiki-100k.txt
Wictionary top 100,000 most frequently-used English words [for john the ripper]
the
of
and
to
a
in
that
I
was
he
@Gimcrack
Gimcrack / package.json
Created May 6, 2019 19:52
Laravel echo server for development
{
"scripts" : {
"echo-dev" : "laravel-echo-server --config=laravel-echo-server-dev.json start"
}
}