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
require 'prime' | |
module Words | |
CTP = Hash[('a'..'z').zip(Prime)].merge!(Hash[('A'..'Z').zip(Prime)]) | |
def self.anagrams?(*words) | |
words.map{|w| w.to_s.chars.map{|c| CTP[c]}.inject(&:*)}.uniq.one? | |
end | |
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
MR. BROOKS: MR. SPEAKER, FAKE NEWS BY THE LEFTIST "WASHINGTON POST" HAS GOTTEN MORE SHRILL AND MORE IRRATIONAL SINCE DONALD TRUMP BECAME PRESIDENT. AT A REPUBLICAN MEETING IN PHILADELPHIA, A FELONY WAS COMMITTED BY THE ILLEGAL TAPE RECORDING AND SUBSEQUENT PUBLICATION OF MY PRIVATE CONVERSATION WITH VICE PRESIDENT MIKE PENCE ABOUT VOTER FRAUD. "THE WASHINGTON POST" REPORTED THAT I SAID, QUOTE, IN MY FIRST ELECTION IN 1982, DEMOCRATS RIGGED ABOUT 25% OF THE VOTING MACHINES TO VOTE FOR EVERYONE ON THE BALLOT BUT ME. THAT'S 11 OF 45 MACHINES. END QUOTE. RATHER THAN REPORTING ABOUT MY BEING A VOTER FRAUD VICTIM OR ABOUT SOMETHING ELSE I SAID THAT A FEDERAL COURT DECREE OPENED THE FLOODGATES FOR ILLEGAL ALIEN VOTING "THE WASHINGTON POST" DID A PARTISAN FAKE NEWS HIT PIECE AND GAVE ME A POOR PINOCCHIO SCORE ON TRUTHFULNESS. MR. SPEAKER, I PROUDLY WEAR "THE WASHINGTON POST" FOUR PINOCCHIOS LIKE A BADGE OF HONOR. I WAS THERE. HERE ARE THE FACTS. IN 1982, I WAS A REPUBLICAN CANDIDATE IN THE ALABAMA HOUSE DISTRICT 18 A |
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
export const TRUECASH_OFFER_REQUEST = "TRUECASH_OFFER_REQUEST"; | |
export const TRUECASH_OFFER_SUCCESS = "TRUECASH_OFFER_SUCCESS"; | |
export const TRUECASH_OFFER_FAILURE = "TRUECASH_OFFER_FAILURE"; | |
export function fetchTruecashOffer(pag, offerId) { | |
return { | |
pag, | |
offerId, | |
[CALL_API]: { | |
endpoint: `/my_api_endpoint`, |
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
jruby-1.7.20 :023 > com.zag.customerservice.metrics.MetricsConfiguration.new | |
=> #<Java::ComZagCustomerserviceMetrics::MetricsConfiguration:0x44948ac6> | |
jruby-1.7.20 :024 > java.lang.Class.for_name('com.zag.customerservice.metrics.MetricsConfiguration') | |
Java::JavaLang::ClassNotFoundException: com/zag/customerservice/metrics/MetricsConfiguration | |
from java.lang.Class.forName0(Native Method) | |
from java.lang.Class.forName(java/lang/Class.java:260) | |
from java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:483) | |
from RUBY.evaluate((irb):24) | |
from org.jruby.RubyKernel.eval(org/jruby/RubyKernel.java:1111) | |
from org.jruby.RubyKernel.loop(org/jruby/RubyKernel.java:1511) |
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
@ltmb ➜ docking rvm:(ruby-2.1.3@docking) git:(master) ✗ docker run -p 3306:3306 -v /Users/sholden/workspace/docking/tmp/mysql:/var/lib/mysql tutum/mysql /bin/bash -c "/usr/bin/mysql_install_db" | |
Installing MySQL system tables... | |
141019 21:40:31 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. | |
Installation of system tables failed! Examine the logs in | |
/var/lib/mysql for more information. | |
You can try to start the mysqld daemon with: | |
shell> /usr/sbin/mysqld --skip-grant & |
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
drop table if exists shard_seq_tbl; | |
create table shard_seq_tbl ( nextval bigint not null primary key auto_increment ) engine = MyISAM; | |
alter table shard_seq_tbl AUTO_INCREMENT = 10000; | |
drop function if exists shard_nextval; | |
DELIMITER // | |
create function shard_nextval() | |
RETURNS bigint NOT DETERMINISTIC | |
begin | |
insert into shard_seq_tbl values (NULL) ; | |
set @R_ObjectId_val=LAST_INSERT_ID() ; |
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
$(".email_edit_icon").click(); | |
setTimeout(function() { | |
$(".commSettings input[type='checkbox']").prop('checked', false); | |
$(".commSettings input[name='evRemind'][value='1']").prop('checked', true); | |
$(".commSettings input[name='mailing_list_status'][value='0']").prop('checked', true); | |
$(".commSettings form").each(function(i, f) { | |
$.ajax({ | |
type: 'POST', | |
url: $(f).attr('action'), | |
data: $(f).serialize(), |
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 Identifiable | |
extend ActiveSupport::Concern | |
$oids = Set.new | |
included do | |
after_initialize :generate_uuid | |
validates_presence_of :uuid | |
end | |
private |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 1 in line 6.
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
style_name,cf_body_type,market_class | |
"5dr HB Man","4dr Car","4-door Sub-Compact Passenger Car" | |
"5dr HB Auto","4dr Car","4-door Sub-Compact Passenger Car" | |
"5dr HB Man Sport","4dr Car","4-door Sub-Compact Passenger Car" | |
"5dr HB Auto Sport","4dr Car","4-door Sub-Compact Passenger Car" | |
"5dr HB Auto Sport w/Navi","4dr Car","4-door Sub-Compact Passenger Car" | |
how many body styles do most styles have? | |
'1','29622' |
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
dealer_in_a_dma_only: | |
user_type: dealer | |
title: dma only | |
message: dma only | |
start_at: <%= Time.now - 3.days %> | |
options: '<%= { :dma => ['san jose'] }.to_yaml %>' | |
dealer_in_a_dma_and_make: | |
user_type: dealer | |
title: dma and make |
NewerOlder