Project | Long Running Ruby and Rails Benchmarks | |
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
words = File.read!("input.txt") |> String.split | |
defmodule A do | |
def get(words, beginning, sequence) do | |
if words[beginning] do | |
words[beginning] |> Enum.filter(fn word -> | |
!Enum.member?(sequence, word) | |
end) | |
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
words = File.read("input.txt").split | |
def get(words, beginning, sequence) | |
words[beginning].select { |word| !sequence.include?(word) } if words[beginning] | |
end | |
def kalodont(words, sequence) | |
selected_words = get(words, sequence.last[-2..-1], sequence) | |
if selected_words && !selected_words.empty? |
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
# disable sleep | |
sudo pmset -b sleep 0; sudo pmset -b disablesleep 1 | |
# re-enable sleep | |
sudo pmset -b sleep 5; sudo pmset -b disablesleep 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
{ | |
"push": { | |
"changes": [ | |
{ | |
"forced": false, | |
"old": { | |
"name": "master", | |
"links": { | |
"commits": { | |
"href": "https://api.bitbucket.org/2.0/repositories/bmarko021/test/commits/master" |
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 node lts version | |
curl -sL install-node.now.sh/lts | sudo bash |
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
Opis ideje za sajt za prikaz zemalja u koje mogu putovati srpski državljani za vreme covid-19 pandemije. | |
- Skrejpuj http://www.mfa.gov.rs/sr/index.php/konzularni-poslovi/putovanja-u-inostranstvo/vesti-za-putovanja-u-inostranstvo/22669-----------covid-19?lang=lat | |
- Stavi u tabelu po zemljama sa kolonama MOZE / NE MOZE | |
- Odredi da li se moze na osnovu prve recenice (ako prva recenica sadrzi 'moze' onda se moze, ako sadrzi 'ne moze' onda se ne moze) | |
- Omoguci opciju za prikaz celokupnog teksta za odredjenu drzavu | |
- Omoguci subscribe na odredjenu zemlju |
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
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- kill running query | |
SELECT pg_cancel_backend(procpid); | |
-- kill idle query |
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
# Dock to the bottom | |
gsettings set com.canonical.Unity.Launcher launcher-position Bottom | |
# Dock to the left | |
gsettings set com.canonical.Unity.Launcher launcher-position Left | |
# Source | |
https://www.howtogeek.com/251616/how-to-move-the-unity-desktops-launcher-to-the-bottom-of-your-screen-on-ubuntu-16.04/ |
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
# Stolen from here https://www.tylernichols.com/apple/speed-up-mouse-tracking-on-mac-os-x | |
defaults write -g com.apple.mouse.scaling 6.0 | |
# Boost keyboard speed | |
defaults write NSGlobalDomain KeyRepeat -int 1 |
NewerOlder