Skip to content

Instantly share code, notes, and snippets.

@egg82
egg82 / proxmox_nvidia.md
Last active May 10, 2024 15:01
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.

@stevelacey
stevelacey / iana-to-activerecord-bullshit-timezone-mapping.py
Last active May 10, 2024 15:00
Zendesk timezones are represented by friendly names that map to tz database names. For example, an API request returns "Eastern Time (US & Canada)" instead of "America/New_York". You can map the friendly names to the tz database names by referencing the Constants > Mapping section of the Ruby on Rails TimeZone object doc. https://developer.zende…
# -*- coding: utf-8 -*-
"""
Zendesk timezones are represented by friendly names that map to tz database names.
For example, an API request returns "Eastern Time (US & Canada)" instead of "America/New_York".
You can map the friendly names to the tz database names by referencing the Constants > Mapping
section of the Ruby on Rails TimeZone object doc.
https://developer.zendesk.com/rest_api/docs/core/users#time-zone
@JohnColvin
JohnColvin / gist:e0a6e0e2b6f9c08c84e0
Last active May 10, 2024 14:59
Recommended browsers by platform and UAs for testing purposes
OS X
Recommendations:
10.7 and up:
Chrome (https://www.google.com/chrome/browser/desktop/index.html)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36
Firefox (http://getfirefox.com) 32 bit macs cannot run chrome, but can run FF
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:25.0) Gecko/20100101 Firefox/25.0
Safari 7, 8, or 9
@artrey
artrey / configure_postgres.sh
Created October 19, 2018 13:07
Configuring postgres database
#!/usr/bin/env bash
DB_USER=${DB_USER:-"default_user"}
DB_PASSWORD=${DB_PASSWORD:-"default_password"}
DB_NAME=${DB_NAME:-"default_name"}
sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASSWORD';"
sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
@artrey
artrey / locales-instructions.txt
Created October 24, 2018 08:51
Locales to *NIX systems
1. nano /etc/default/locale
# example
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LC_TYPE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
2. locale-gen en_US.UTF-8
@artrey
artrey / Инструкция.md
Last active May 10, 2024 14:59
Как создать Telegram бота?
  1. Запустите Telegram и найдите бота @BotFather или просто перейдите по ссылке. Это бот для создания новых ботов.
  2. Начните чат с ботом. Для того чтобы создать нового бота - напишите команду /newbot.
  3. Укажите имя бота - это имя будет отображаться в чатах и оно может быть любым.
  4. Затем укажите идентификатор бота - это имя без пробелов, которое оканчивается на bot или Bot. Этот идентификатор должен быть уникальным. Можете пробовать различные имена, BotFather укажет, если что-то ему не понравится :)
  5. Все, на этом бот готов! На экран будет выведен токен для управления ботом.
  6. По желанию можно установить описание бота с помощью команды /setdescription и изображение с помощью команды /setuserpic.
@eggplants
eggplants / ALT-SH.md
Last active May 10, 2024 14:59
List of alternative shell-scripting languages (or shells)

Alternative shell-scripting languages (or shells)

  • sorted by repo name [a-z]

amirbawab/BashClass

BashClass is an Object Oriented Programming language that compiles to BASH 4.4

@artrey
artrey / dataset.csv
Created July 21, 2021 21:19
Fake dataset
Date Shop Country Visitors Earnings
2021-01-10 Metro DE 30861 663462
2021-01-10 IKEA GB 45071 233363
2021-01-10 H&M US 64099 488619
2021-01-10 Walmart DE 49261 271064
2021-01-10 IKEA FR 65216 615775
2021-01-11 IKEA DE 7618 126885
2021-01-11 IKEA RU 38168 775906
2021-01-11 IKEA FR 12712 689709
2021-01-11 Prisma FR 91555 522156
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active May 10, 2024 14:59
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {

Dataset: https://gist.github.com/artrey/8d6a3f2d91cefb5e6343bedbc9ef8c79

Вам необходимо разработать API сервис для выдачи информации из датасета выше. Клиент должен иметь возможность:

  1. Получать только запрошенные колонки
  2. Фильтровать данные по одной или нескольким колонкам: дате (from/to), магазинам, странам
  3. Группировать данные по одной или нескольким колонкам: датам, магазинам, странам
  4. Сортировать по любой из колонок

Если клиент не указывает, какие колонки необходимо отобразить, то требуется отобразить все колонки.