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
https://www.cnbc.com/2025/01/24/target-rolls-back-major-dei-initiatives.html?__source=sharebar|twitter&par=sharebar | |
Target | |
Walmart | |
TractorSupply | |
Meta | |
McDonalds | |
https://fortune.com/2025/01/23/dei-donald-trump-executive-order-presidential-action-what-it-means-for-businesses/ | |
Ford | |
Lowes |
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
BEGIN; | |
-- Extend timeout for really large datasets | |
SET statement_timeout = 10000; | |
SET session_replication_role='replica'; | |
UPDATE legiscan_model_states SET id=43 WHERE abbr='TX'; | |
UPDATE voter_records SET state_id=43 WHERE state_id=54; | |
SET session_replication_role='original'; | |
COMMIT; |
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
# Install Ruby2.6 from Brightbox APT repository | |
config.vm.provision "shell", inline: <<-SHELL | |
apt-get -y install software-properties-common | |
apt-add-repository -y ppa:brightbox/ruby-ng | |
apt-get update | |
apt-get -y install ruby-switch ruby-bundler ruby2.3 ruby2.3-dev | |
sudo gem install bundler -v 1.16.6 | |
SHELL |
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 | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'ubuntu/xenial64' | |
config.vm.network 'forwarded_port', guest: 80, host: 80, auto_correct: true | |
config.vm.network 'forwarded_port', guest: 443, host: 443, auto_correct: true |
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
# replace double quotes with single quotes as well | |
# needs to be updated to exclude interopolated strings | |
=(\s)?["|'](.*)?["|’] | |
=$1'$2’ | |
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
# lib/ext/activeadmin.rb | |
module ActiveAdminPaperTrailDetails | |
def versions | |
panel 'Versions', class: 'versions' do | |
table_for resource.versions.order :created_at do | |
column(:whodunnit) { |v| auto_link User.find_by(id: v.whodunnit) } | |
column :event | |
column 'When', :created_at | |
column 'Changes' do |v| | |
attributes_table_for v.changeset.to_a do |
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 largestSum(ns: List[Int]): Int ={ | |
def sum(numbers: List[Int]) = numbers.foldLeft(0)((a,b) => a+ b) | |
@tailrec def loop(numbers: List[Int], large: Int): Int = numbers match{ | |
case Nil => large | |
case _ => { | |
val thisSum = sum(numbers) | |
if(thisSum > large) | |
loop(numbers.tail, thisSum) | |
else |