Skip to content

Instantly share code, notes, and snippets.

View Fryguy's full-sized avatar
💻
Codin'

Jason Frey Fryguy

💻
Codin'
View GitHub Profile
@Fryguy
Fryguy / bookmarklet.js
Last active February 18, 2023 21:07
Unlock Password Bookmarklet
javascript:(function(){pwd=document.getElementById('password');pwd.removeAttribute('autocomplete');pwd.removeAttribute('readonly');pwd.style.backgroundColor='white';})();
Jason Frey
Build a text adventure game that I can play in this chat
--------------------------------------------------------------------------------
ChatGPT
Sure, I'd be happy to help you create a text adventure game that you can play in this chat! Here's a simple version of the game to get started:
@Fryguy
Fryguy / table.md
Last active June 23, 2022 18:06
intersight_client autoload details

Table of loading constants one-by-one

Constant Memory (MB) Time (s)
VERSION 52.92578125 2.00001522898674e-06
Error 53.01171875 0.0017869999865069985
AaaAbstractAuditRecordAllOf 53.09375 0.0020860000513494015
AaaAuditRecordAllOf 53.10546875 0.0018570000538602471
AaaAuditRecordListAllOf 53.16796875 0.0016219998942688107
AaaAuditRecordResponse 53.2109375 0.0007399999303743243
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 6 columns, instead of 4. in line 5.
id,name,filename,baseurl,mirrors,metalink
ansible-runner,Ansible Runner for EL 8 - x86_64,/etc/yum.repos.d/ansible-runner.repo,https://releases.ansible.com/ansible-runner/rpm/epel-8-x86_64/,,
AppStream,CentOS-8 - AppStream,/etc/yum.repos.d/CentOS-AppStream.repo,http://centos.vwtonline.net/centos/8.2.2004/AppStream/x86_64/os/ (9 more),http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock,
BaseOS,CentOS-8 - Base,/etc/yum.repos.d/CentOS-Base.repo,http://mirrors.cmich.edu/centos/8.2.2004/BaseOS/x86_64/os/ (9 more),http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=BaseOS&infra=stock,
epel,Extra Packages for Enterprise Linux 8 - x86_64,/etc/yum.repos.d/epel.repo,http://mirror.pit.teraswitch.com/fedora/epel/8/Everything/x86_64/ (99 more),,https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=x86_64&infra=stock&content=centos
epel-modular,Extra Packages for Enterprise Linux Modular 8 - x86_64,/etc/yum.repos.d/epel-modular.repo,https://mirror.shastacoe.net/epel/8/Modular/x86_64/ (
@Fryguy
Fryguy / code-extractor.sh
Created October 28, 2019 15:36
code-extractor
#!/bin/bash
# Also see https://github.com/juliancheal/code-extractor/blob/master/code_extractor.rb
SOURCE_URL=git@github.com:crystal-lang/crystal
SOURCE_REPO=crystal-lang/crystal
SOURCE_BRANCH=master
DEST_NAME=crystal-readline
DEST_DIR=$DEST_NAME
@Fryguy
Fryguy / _instructions.md
Last active July 13, 2018 01:11
Rails + Threads + constantize
  1. Create a vanilla Rails

    rails _5.0.7_ new vanilla_test --skip-yarn --skip-active-storage --skip-action --skip-sprockets --skip-spring --skip-listen --skip-coffee --skip-javascript --skip-turbolinks --skip-test --skip-system-test --skip-bootsnap
    
  2. Copy the files into the right spots

  3. Run it

diff --git a/db/fixtures/aws_instance_types.yml b/db/fixtures/aws_instance_types.yml
index 09f8671..60871af 100644
--- a/db/fixtures/aws_instance_types.yml
+++ b/db/fixtures/aws_instance_types.yml
@@ -1,13 +1,18 @@
---
c1.medium:
+ :current_generation: false
+ :current_version: true
:name: c1.medium
@Fryguy
Fryguy / miq_hash_struct_perf.rb
Created June 21, 2018 16:06
MiqHashStruct vs OpenStruct
require 'benchmark/ips'
require 'manageiq-gems-pending'
require 'miq-hash_struct'
require 'ostruct'
large_hash = (0..1000).each_with_object({}) { |i, h| h["a#{i}"] = i }
small_hash = (0..4).each_with_object({}) { |i, h| h["a#{i}"] = i }
Benchmark.ips do |x|

Keybase proof

I hereby claim:

  • I am Fryguy on github.
  • I am fryguy (https://keybase.io/fryguy) on keybase.
  • I have a public key whose fingerprint is DB0E 094B 3281 4567 8E97 6DB7 A9EB 1249 7632 AA7B

To claim this, I am signing this object:

require 'licensee'
require 'active_support/core_ext/object/try'
licenses = `bundle list --paths`.split.collect do |gem_path|
[File.basename(gem_path), Licensee.license(gem_path).try(:key)]
end
require 'more_core_extensions/core_ext/array/tableize'
puts licenses.unshift(["gem", "license"]).tableize