- Intel Core i5 8400 Base:2.80GHz, Turbo:4.00GHz / 9MB / LGA1151 / 6 Core / 65W / Coffee Lake
- Gigabyte GeForce GTX 1080 Windforce OC GV-N1080WF3OC-8GD
- MSI Z370-A PRO Motherboard MSI Z370-A PRO MB, Z370, 4x DDR4, 2x PCIE3.0 x16, 4x PCI-E3.0 x1, 6x SATA3, M.2, 8x USB3.1, VGA, DVI, DisplayPort, ATX, White LED
- Corsair Vengeance LPX 16GB (2x8GB) 3200MHz DDR4 CMK16GX4M2B3200C16
- OCZ Agility 3 240G SATA3 SSD
- Corsair TX-850 V2 ATX Power Supply 140mm fan
- Thermaltake Black Commander MS-II Mid Tower Chassis (USB3)
This file contains 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
@mixin background-image-retina($file, $type, $width, $height) { | |
background-image: url($file + '.' + $type); | |
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) { | |
& { | |
background-image: url($file + '@2x.' + $type); | |
-webkit-background-size: $width $height; | |
} | |
} | |
} |
This file contains 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 search_chosen(selector, search) | |
page.execute_script "jQuery('#{selector}').click();" | |
find('div.chzn-search input').set search | |
end | |
def select_from_chosen(selector, name) | |
page.execute_script "jQuery('#{selector}').click();" | |
page.execute_script "jQuery(\".chzn-results .active-result:contains('#{name}')\").click();" | |
wait_for_ajax | |
end |
This file contains 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
use std::collections::HashSet; | |
use std::sync::{Arc, RwLock, RwLockReadGuard}; | |
/// A HashSet that allows controlling when items are actually removed from the list. | |
/// This can be helpful if you need to keep track of items being added over time | |
/// and ensuring that they don't get added _and_ removed before you've read them. | |
struct LockedHashSet { | |
values: Arc<RwLock<HashSet<u64>>>, | |
values_marked_for_removal: Arc<RwLock<HashSet<u64>>>, | |
} |
This file contains 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
use crate::entities::player::Player; | |
use bevy::input::{keyboard::KeyCode, Input}; | |
use bevy::prelude::*; | |
use bevy::render::camera::Camera; | |
const PLAYER_SPEED: f32 = 500.0; | |
const PADDING: f32 = 100.0; | |
pub fn player_movement_system( | |
time: Res<Time>, |
This file contains 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
# frozen_string_literal: true | |
class SchemaDump | |
VERSION_REGEX = / | |
^--\sDumped\sfrom\sdatabase\sversion.*$\n | |
^--\sDumped\sby\spg_dump\sversion.*$\n | |
^\n | |
/x | |
def self.call(database_url, filename:) |
This file contains 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
#!/usr/bin/env ruby | |
# | |
# Lazy sources: | |
# | |
# - https://stackoverflow.com/a/6018744 | |
# - https://stackoverflow.com/a/4179491 | |
require 'time' | |
def ranges_overlap?(a, b) |
This file contains 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
module Sequel | |
class Dataset | |
alias_method :execute_orig, :execute | |
def execute(*args, &block) | |
SequelNotifications.subscribers.each do |subscriber| | |
subscriber.call(*args, &block) | |
end | |
execute_orig(*args, &block) | |
end |
This file contains 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
git_source(:github) do |repo_name| | |
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") | |
"https://github.com/#{repo_name}.git" | |
end |
NewerOlder