Skip to content

Instantly share code, notes, and snippets.

View bmarkons's full-sized avatar
💨

Marko Bogdanović bmarkons

💨
View GitHub Profile
def timeleft(age):
return 2014+(100-int(age))
name=input("Tell me your name: ")
age=input("And age: ")
print(timeleft(age))
if int(age)<31:
print("Well, hello " + name + "\nYou are still pretty young. You will turn 100 years old in ",timeleft(age)," years. Enjoy your life. :) ")
elif int(age)>=100:
# Coding folder
mkdir ~/dev
# vim
sudo apt-get install vim
# git
sudo apt-get install git
@bmarkons
bmarkons / gsoc2017.md
Last active August 13, 2018 21:48
Google Summer of Code 2017 - summary

Google Summer of Code 2017 - Long Running Ruby and Rails Benchmarks

Organization
Project Long Running Ruby and Rails Benchmarks
@bmarkons
bmarkons / mouse_speed.sh
Last active November 30, 2020 12:11
Boost mouse speed on iMac
# 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
@bmarkons
bmarkons / dock-launcher
Created November 26, 2017 12:46
Dock Ubuntu launcher to the bottom of the screen
# 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/
@bmarkons
bmarkons / postgres_queries_and_commands.sql
Last active October 8, 2020 14:24 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- 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
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
@bmarkons
bmarkons / node
Last active December 17, 2020 14:57
# Install node lts version
curl -sL install-node.now.sh/lts | sudo bash
{
"push": {
"changes": [
{
"forced": false,
"old": {
"name": "master",
"links": {
"commits": {
"href": "https://api.bitbucket.org/2.0/repositories/bmarko021/test/commits/master"
@bmarkons
bmarkons / gist:5bf80b97ac4f5860f903c60cbbe3540d
Created October 5, 2021 19:38 — forked from jampajeen/gist:d19f36a7309d0ead0e1f9735a26d66f3
Disable/Enable Mac OSX sleep on lid closed
# 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