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
diff --git a/app/models/setting/ads.rb b/app/models/setting/ads.rb | |
index f9361c6..5cf650b 100644 | |
--- a/app/models/setting/ads.rb | |
+++ b/app/models/setting/ads.rb | |
@@ -1,7 +1,7 @@ | |
class Setting::Ads | |
include Mongoid::Document | |
- CACHE_KEY = "ads_config" | |
+ CACHE_KEY = "ads-config" |
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
You're using: groupdate 2.3.0. The latest version is 2.4.0 | |
You're using: client_side_validations 3.2.2. The latest version is 3.2.6 | |
You're using: activeadmin 1.0.0.pre. The latest version is 0.6.3 | |
You're using: actionmailer 4.0.5. The latest version is 4.2.0 | |
You're using: actionpack 4.0.5. The latest version is 4.2.0 | |
You're using: active_utils 1.0.3. The latest version is 2.2.3 | |
You're using: activemerchant 1.26.0. The latest version is 1.45.0 | |
You're using: activemodel 4.0.5. The latest version is 4.2.0 | |
You're using: activerecord 4.0.5. The latest version is 4.2.0 | |
You're using: activesupport 4.0.5. The latest version is 4.2.0 |
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::io; | |
use std::rand; | |
enum Ordering { | |
Bigger, | |
Smaller, | |
Equal, | |
} | |
fn cmp(x: usize, y: usize) -> Ordering { |
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
./etcd -name infra0 -initial-advertise-peer-urls http://10.0.15.30:2380 \ | |
-listen-peer-urls http://10.0.15.30:2380 \ | |
-listen-client-urls http://10.0.15.30:2379,http://127.0.0.1:2379 \ | |
-advertise-client-urls http://10.0.15.30:2379 \ | |
-initial-cluster-token etcd-cluster-1 \ | |
-initial-cluster infra0=http://10.0.15.30:2380,infra1=http://10.0.15.31:2380 \ | |
-initial-cluster-state new | |
./etcd -name infra1 -initial-advertise-peer-urls http://10.0.15.31:2380 \ | |
-listen-peer-urls http://10.0.15.31:2380 \ |
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
for word in $(grep 'a\|e\|i\|o\|u' /usr/share/dict/web2) | |
do | |
if [ `echo $word | tr -cd 'aeiou'` == "aeiou" ] && [ `echo $word | tr -cd 'aeiou' | wc -c` == 5 ]; then | |
echo $word | |
fi | |
done |
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_commit() { | |
cmd='git commit -a -m "" -m "[' | |
space='"' | |
BUFFER=$cmd$(pbpaste)]$space | |
zle get-line | |
zle end-of-line | |
zle backward-word | |
zle backward-word | |
zle backward-word | |
zle forward-char |
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
Randomized with seed 2206 | |
[rspec-sidekiq] WARNING! Sidekiq will *NOT* process jobs in this environment. See https://github.com/philostler/rspec-sidekiq/wiki/FAQ-&-Troubleshooting | |
....F.F......................................................................................................F...................unknown OID 705: failed to recognize type of 'period'. It will be treated as String. | |
............................................................................................................................................................................................................................................................................................. | |
Failures: | |
1) Api::Sportbook::PinnacleEventsController GET #unmatched should not list events from the past | |
Failure/Error: expect(json_response).to eq(expected_result) | |
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
❯ cat flip.rb | |
require 'benchmark/ips' | |
DAYS = [:mon, :tue, :wed, :thur, :fri, :sat, :sun] | |
count = 0 | |
DAYS.each do |day| | |
if day == :tue .. day == :thur | |
count += 1 | |
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
#!env ruby | |
require 'date' | |
from = Date.new(*ARGV[1].split(',').map(&:to_i)).to_time.to_i | |
to = Date.new(*ARGV[2].split(',').map(&:to_i)).to_time.to_i | |
File.open(ARGV[0]).each_line do |line| | |
/: (?<timestamp>\d+)/ =~ line rescue next | |
puts line if timestamp.to_i.between?(from, to) | |
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
wifi.setmode(wifi.STATION) | |
wifi.sta.config("nazwawifi","haslo") | |
wifi.sta.connect() | |
tmr.delay(1000000) | |
print(wifi.sta.status()) | |
print(wifi.sta.getip()) | |
tmr.alarm(0, 400000, 1, function () | |
require 'ds18b20' |