Skip to content

Instantly share code, notes, and snippets.

View eseidel's full-sized avatar

Eric Seidel eseidel

View GitHub Profile
@eseidel
eseidel / gist:5317911
Created April 5, 2013 09:19
Patch with a script capable of removing ENABLE(), USE(), etc. macros from WebCore.
diff --git a/Source/WebCore/SpacingHeuristics.pm b/Source/WebCore/SpacingHeuristics.pm
new file mode 100644
index 0000000..7de0172
--- /dev/null
+++ b/Source/WebCore/SpacingHeuristics.pm
@@ -0,0 +1,101 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+#
@eseidel
eseidel / results.json
Created December 31, 2015 03:37
first pass at a results.json for compile-explorer
[
{
"rules": [
"DefaultPass",
"DefaultPass",
"OneLevelSuitOpening",
"DefaultPass",
"OneLevelNewSuitResponse",
"DefaultPass",
"NewOneLevelMajorByOpener",
Class  Accumulated Size (New)▼ Accumulated Instances  Current Size  Current Instances  Accumulator Size (Old)  Accumulator Instances  Current Size  Current Instances 
_List 1.5GB 18,158,601 5.4KB 32 380.1MB 5,130,398 331.2MB 4,751,364
_OneByteString 415.5MB 5,925,535 75.4KB 9 199.7MB 3,130,872 198.9MB 3,116,105
Context 313.5MB 7,831,824 0B 0 217.4KB 6,587 30.4KB 929
_GrowableList 281.1MB 9,211,140 0B 0 101.1MB 3,313,068 99.0MB 3,244,518
_HashMapEntry 251.5MB 5,494,754 0B 0 48.0MB 1,047,972 47.2MB 1,032,033
_Closure 199.8MB 6,548,585 0B 0 211.3KB 6,762 39.7KB 1,271
_FixedSizeArrayIterator 173.5MB 3,791,052 0B 0 0B 0 0B 0
SimpleIdentifierImpl 172.8MB 2,265,469 0B 0 161.2MB 2,112,885 160.3MB 2,101,512
@eseidel
eseidel / gist:0d892da101fcc361efaf70f7a97adfc6
Created January 2, 2017 20:44
Yasuo vs. melee minions, no runes or masteries
Erics-MacBook-Air [67203:lol_duel]% dart bin/duel.dart -v duel.yaml [/src/lol_duel]
[Blue Yasuo] vs. [Red Melee Minion]
Blue Team
Yasuo
LVL: 1 HP : 517.76 / 517.76
AD : 55 AP : 0
AR : 25 MR : 30
AS : 0.670
Items: []
@eseidel
eseidel / gist:b4a7d1d012469655189d0f786b40db01
Created January 8, 2017 21:55
LoL 6.24 spell names (from championFull.json)
Aatrox : (AatroxQ, AatroxW, AatroxE, AatroxR)
Ahri : (AhriOrbofDeception, AhriFoxFire, AhriSeduce, AhriTumble)
Akali : (AkaliMota, AkaliSmokeBomb, AkaliShadowSwipe, AkaliShadowDance)
Alistar : (Pulverize, Headbutt, AlistarE, FerociousHowl)
Amumu : (BandageToss, AuraofDespair, Tantrum, CurseoftheSadMummy)
Anivia : (FlashFrost, Crystallize, Frostbite, GlacialStorm)
Annie : (Disintegrate, Incinerate, MoltenShield, InfernalGuardian)
Ashe : (AsheQ, Volley, AsheSpiritOfTheHawk, EnchantedCrystalArrow)
AurelionSol : (AurelionSolQ, AurelionSolW, AurelionSolE, AurelionSolR)
Azir : (AzirQWrapper, AzirW, AzirEWrapper, AzirR)
@eseidel
eseidel / gist:61c8305e2decaa6eeaa9d13a00991419
Created January 13, 2017 15:47
Duel results with Olaf and Darius passives implemented
% dart bin/round_robin.dart
Dueling all 8911 pairs of 134 champions
using no items, runes or masteries or abilities.
Note: A few have passives implemented, as indicated.
Name Victories Status
===================================
Kled 0
Orianna 1
Karthus 2
% dart --checked bin/dragon_clear.dart [/src/lol_duel]
warning: Error loading champion.gg data for Sion JUNGLE
warning: Mastery Expose Weakness has no defined effects.
warning: Mastery Runic Armor has no defined effects.
warning: Mastery Insight has no defined effects.
warning: Mastery Swiftness has no defined effects.
warning: Mastery Courage of the Colossus has no defined effects.
warning: Stat: rFlatPhysicalDamageModPerLevel missing apply rule.
warning: Stat: rFlatMagicDamageModPerLevel missing apply rule.
Amumu (lvl 4)
@eseidel
eseidel / main.dart
Created January 8, 2020 05:59
Confusing analysis error
List<int> foo = [1, 2];
// a whole bunch of code
void List<int> bar = [2, 3];
// accidental void above, causes *much* earlier errors with "List" type
@eseidel
eseidel / main.dart
Created May 25, 2020 22:45
Playing with Boids
import 'dart:ui';
import 'package:flutter/material.dart';
import 'dart:math';
const double kBoidVelocity = 5.0;
const double kBoidScale = 2.0;
const int kBoidCount = 50;
const double kBoidMaxSteerSpeed = .1;
// Governs how much the boids spread out at the start.
@eseidel
eseidel / main.dart
Created May 26, 2020 01:17
Zoolander boids
import 'dart:ui';
import 'package:flutter/material.dart';
import 'dart:math';
const double kBoidVelocity = 5.0;
const double kBoidScale = 2.0;
const int kBoidCount = 100;
const double kBoidMaxAvoidSteerSpeed = .1;
const double kBoidMaxAlignSteerSpeed = .1;