Skip to content

Instantly share code, notes, and snippets.

View mamantoha's full-sized avatar
🇺🇦
#StandWithUkraine

Anton Maminov mamantoha

🇺🇦
#StandWithUkraine
  • Ternopil, Ukraine
  • 21:31 (UTC +03:00)
View GitHub Profile
@bobby1030
bobby1030 / telegramdesktop.desktop
Created August 20, 2017 08:28
Telegram Desktop Entry
[Desktop Entry]
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=/opt/Telegram/Telegram
Exec=/opt/Telegram/Telegram -- %u
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
@baweaver
baweaver / ruby_books.md
Last active May 22, 2024 17:22
A list of books for learning and expanding on your Ruby knowledge.

Ruby Book List

Learning Ruby

You're taking your first steps into Ruby

A good introduction to programming in general. Easy on newer programmers.

@z3ntu
z3ntu / README.md
Last active April 4, 2024 23:32
KDE 1 Arch Linux install guide
@qnub
qnub / fonts.conf
Last active July 7, 2022 00:37 — forked from BojanStipic/fonts.conf
Linux color emoji
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test qual="any" name="family"><string>DejaVu Sans</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Sans</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>FreeSans</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Sans</string></edit>
@mamantoha
mamantoha / set_kde_wallpaper.rb
Last active April 16, 2018 12:26
Ruby script to change desktop wallpaper in Plasma > 5.7 from GoPro photo of the day
require 'net/http'
require 'open-uri'
require 'open3'
require 'json'
require 'optparse'
require 'tempfile'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: #{__FILE__} [options]"
@cvan
cvan / set-up-chromium-keys.md
Last active May 24, 2024 12:05
Launch Chromium with API Keys on Mac OS X and Windows

Last Updated: March 2023

IMPORTANT: Ignore the out-of-date steps below for getting Chromium keys.

Instead, read this up-to-date guide (Jan 2023) written by @LearningToPi.

P.S. Thank you to every contributor below who provided tips over the years on what should be a straightforward process: setting up Chromium for local development.

Long live the web!

Crystal vs Node.js Websocket Benchmark

Crystal 0.9.1 with Kemal

require "kemal"

ws "/" do |socket|
  socket.on_message do |message|
 end
@mamantoha
mamantoha / experience.rb
Last active March 14, 2024 08:21
Rails API Filtering and Sorting
# app/models/experience.rb
#
# == Schema Information
#
# Table name: experiences
#
# id :integer not null, primary key
# title :string
# description :text
# created_at :datetime not null
@pixeltrix
pixeltrix / time_vs_datatime.md
Last active February 18, 2024 19:20
When should you use DateTime and when should you use Time?

When should you use DateTime and when should you use Time?

It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:

>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
call NERDTreeAddKeyMap({'key': 't', 'callback': 'NERDTreeMyOpenInTab', 'scope': 'FileNode', 'override': 1 })
function NERDTreeMyOpenInTab(node)
call a:node.open({'reuse': "all", 'where': 't'})
endfunction