This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--bbcb-deleted-word: rgb(255, 204, 51); | |
--bbcb-deleted-line: rgb(255, 238, 186); | |
--bbcb-added-word: rgb(127, 177, 251); | |
--bbcb-added-line: rgb(213, 227, 249); | |
} | |
.udiff-line.deletion pre.source del, | |
div[type=del] del { | |
background-color: var(--bbcb-deleted-word) !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration for Alacritty, the GPU enhanced terminal emulator. | |
# Any items in the `env` entry below will be added as | |
# environment variables. Some entries may override variables | |
# set by alacritty itself. | |
#env: | |
# TERM variable | |
# | |
# This value is used to set the `$TERM` environment variable for | |
# each instance of Alacritty. If it is not present, alacritty will |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires recycle-bin: https://github.com/sindresorhus/recycle-bin | |
orphan_files = Dir.glob('*.JPG').reject do |jpg_file| | |
File.exist? "#{File.basename(jpg_file, '.*')}.CR2" | |
end | |
puts "Removing #{orphan_files.size} orphan files: " | |
orphan_files_join = orphan_files.join(' ') | |
puts orphan_files_join | |
exec "recycle-bin #{orphan_files_join}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'securerandom' | |
class PasswordGen | |
ALPHANUMERIC = ((48..57).to_a + (65..90).to_a + (97..122).to_a).pack('c*').freeze | |
SYMBOL = ((33..47).to_a + (58..64).to_a + (91..96).to_a + (123..126).to_a).pack('c*').freeze | |
attr_reader :length, :alphanumeric, :symbol | |
def initialize(length: 20, alphanumeric: true, symbol: true) | |
@length = length.to_i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def recursive_letters(letters, depth = 0) | |
character = letters.shift | |
indentation = ' ' * depth | |
puts "#{indentation}<#{character}>" | |
recursive_letters(letters, depth + 1) unless letters.empty? | |
puts "#{indentation}</#{character}>" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChessBoard | |
attr_accessor :rows, :columns, :square_size | |
def initialize(rows, columns, square_size) | |
@rows = rows | |
@columns = columns | |
@square_size = square_size | |
end | |
def render |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
mpv --profile=theater %1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Resolving internal domains | |
local-zone: "local." static | |
local-data: "example.local. IN A [Internal Server IP]" | |
# Stub out CDN domains to use local DNS provided by your ISP | |
stub-zone: | |
name: "akadns.net" | |
stub-addr: [Local DNS IP] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h = { | |
foo: { | |
bar: { | |
baz: 1 | |
}, | |
oof: { | |
zab: 2 | |
} | |
}, | |
zha: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"credentials": { | |
"expires": true, | |
"expires_at": 1436019773, | |
"refresh_token": "[hidden]", | |
"token": "[hidden]" | |
}, | |
"extra": { | |
"raw_info": { | |
"city": "Xi'an", |