Skip to content

Instantly share code, notes, and snippets.

View khashashin's full-sized avatar
🦅
Focusing

khashashin khashashin

🦅
Focusing
View GitHub Profile
@khashashin
khashashin / gist:049a705e10195bade5f78d53e76db745
Last active October 3, 2023 19:20
Simplified Appwrite docker-compose which is easy to upgrate by changing the version number in one place
x-logging: &x-logging
logging:
driver: 'json-file'
options:
max-file: '5'
max-size: '10m'
x-appwrite-service: &appwrite-service
image: appwrite/appwrite:1.4.1
@khashashin
khashashin / child.update.rb
Last active January 28, 2021 07:59
rails cheatsheet
def insert_authors(book)
params[:book][:author].each do |a|
if a.to_i > 0
book.authors << Author.find(a)
end
end
end
def delete_authors(book)
bookAuthors = Book.find(params[:id]).authors
@khashashin
khashashin / chechen_words_parser
Created September 24, 2020 03:00
Parsing chechen words from ps95.ru
import csv
import json
import re
import time
from requests import Session
alphabet = [
"Ӏ", "а", "аь", "б", "в", "г", "гӀ", "д", "е", "ё", "ж", "з", "и", "й", "к", "кх", "къ", "кӀ", "л",
"м", "н", "о", "оь", "п", "пӀ", "р", "с", "т", "тӀ", "у", "уь", "ф", "х", "хь", "хӀ", "ц", "цӀ",
@khashashin
khashashin / snip.html
Created April 6, 2020 21:51 — forked from rbndelrio/snip.html
Vertical aligning with Flexbox + IE9 table fallback
<div class="va">
<div class="va__body">
<div class="va__content">
<h1>Hello, World!</h1>
</div>
</div>
</div>