Skip to content

Instantly share code, notes, and snippets.

View RyanTG's full-sized avatar

Ryan TG RyanTG

View GitHub Profile
Do you want to clone the boot loader (executable code area, the first 446 bytes) to: sdc ?
[Y/n]
The first partition of disk /dev/sda starts at 2048.
Saving the hidden data between MBR (1st sector, i.e. 512 bytes) and 1st partition, which might be useful for some recovery tool, by:
dd if=/dev/sda of=/tmp/ocs_onthefly_local.0NPhFl/src-hidden-data.img skip=1 bs=512 count=2047
2047+0 records in
2047+0 records out
1048064 bytes (1.0 MB, 1.0 MiB) copied, 0.143125 s, 7.3 MB/s
*****************************************************.
Collecting partition /dev/sda1 info...
[ColorEffects:Disabled]
Color=56,56,56
ColorAmount=0
ColorEffect=0
ContrastAmount=0.65
ContrastEffect=1
IntensityAmount=0.1
IntensityEffect=2
[ColorEffects:Inactive]
# --- special colors ---
[Background]
Color=42,33,28
[BackgroundIntense]
Color=42,33,28
[Foreground]
Color=189,174,157
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=5000
SAVEHIST=5000
unsetopt beep
bindkey -v
bindkey "^[[A" history-search-backward
bindkey "^[[B" history-search-forward
# End of lines configured by zsh-newuser-install
@RyanTG
RyanTG / pbm-top20.txt
Created January 17, 2020 22:33
01/17/20 - Places on Pinball Map with the most machines. Top 20
select name,street,city,state,country,count(distinct x.machine_id) from locations l inner join location_machine_xrefs x on x.location_id=l.id group by 1,2,3,4,5 order by 6 desc limit 20;
name | street | city | state | country | count
----------------------------------------------------------------------+---------------------------------------------------------+-------------------+------------------+---------+-------
Pinball Perfection | 231 Perry Highway | Westview | PA | US | 284
Pinball Hall of Fame | 1610 E Tropicana Ave | Las Vegas | NV | US | 204
Pinball PA/Pennsylvania Coin Operated Gaming Hall of Fame and Museum | 2284 Brodhead Road, Suit
@RyanTG
RyanTG / PVR.rb
Created August 4, 2022 04:45
Max overlapping ranges
#!/usr/bin/env ruby
require 'csv'
require 'time'
class PeakVehicleReq
def initialize(filename)
@filename = 'Trips.csv'
end