Skip to content

Instantly share code, notes, and snippets.

View ersinakinci's full-sized avatar

Ersin Akinci ersinakinci

View GitHub Profile
@mrtnzlml
mrtnzlml / store-with-id.json
Created February 6, 2020 14:49
Internal structure of Relay store. Notice the difference for "AllHotelAvailabilityHotel" type. First JSON is an example of AllHotelAvailabilityHotel WITH GraphQL ID and second JSON shows how is it being stored when such ID doesn't exist.
{
"client:root": {
"__id": "client:root",
"__typename": "__Root",
"allAvailableBookingComHotels(search:{\"checkin\":\"2020-02-13\",\"checkout\":\"2020-02-15\",\"cityId\":\"SG90ZWxDaXR5Oi0zNzI0OTA=\",\"roomsConfiguration\":[{\"adultsCount\":2}]})": {
"__ref": "client:root:allAvailableBookingComHotels(search:{\"checkin\":\"2020-02-13\",\"checkout\":\"2020-02-15\",\"cityId\":\"SG90ZWxDaXR5Oi0zNzI0OTA=\",\"roomsConfiguration\":[{\"adultsCount\":2}]})"
}
},
"client:root:allAvailableBookingComHotels(search:{\"checkin\":\"2020-02-13\",\"checkout\":\"2020-02-15\",\"cityId\":\"SG90ZWxDaXR5Oi0zNzI0OTA=\",\"roomsConfiguration\":[{\"adultsCount\":2}]})": {
"__id": "client:root:allAvailableBookingComHotels(search:{\"checkin\":\"2020-02-13\",\"checkout\":\"2020-02-15\",\"cityId\":\"SG90ZWxDaXR5Oi0zNzI0OTA=\",\"roomsConfiguration\":[{\"adultsCount\":2}]})",
@expelledboy
expelledboy / uninstall-nix-osx.sh
Last active November 26, 2023 15:53
Trying Nix
#!/bin/bash
# !!WARNING!!
# This will DELETE all efforts you have put into configuring nix
# Have a look through everything that gets deleted / copied over
nix-env -e '.*'
rm -rf $HOME/.nix-*
rm -rf $HOME/.config/nixpkgs
@raggi
raggi / bm_dci_pounding.rb
Last active September 22, 2016 23:19
Show the effects of method cache damage from runtime extend, as it relates to extend vs. delegate for DCI.
require 'benchmark'
number_of_rails_methods = 300
@rails = Class.new do
number_of_rails_methods.times do |i|
class_eval <<-RUBY
def call#{"%02d" % i} # def call01
end # end
RUBY