Skip to content

Instantly share code, notes, and snippets.


Yurii De dejurin

  • Si-ɑR
View GitHub Profile
dejurin /
Created Jun 9, 2022 — forked from Herz3h/
Locales alpine 3.9

Copy file below into same directory as your Dockerfile

FROM alpine:3.9

# Install language pack
RUN apk --no-cache add ca-certificates wget && \
    wget -q -O /etc/apk/keys/ && \
 wget && \
dejurin / truncate.css
Created Jun 5, 2022 — forked from elky/truncate.css
text-overflow ellipsis with 100% width
View truncate.css
<div class="element">
<div class="truncate">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
View Classifies.txt
/Arts & Entertainment
/Arts & Entertainment/Celebrities & Entertainment News
/Arts & Entertainment/Comics & Animation
/Arts & Entertainment/Comics & Animation/Anime & Manga
/Arts & Entertainment/Comics & Animation/Cartoons
/Arts & Entertainment/Comics & Animation/Comics
/Arts & Entertainment/Entertainment Industry
/Arts & Entertainment/Entertainment Industry/Film & TV Industry
/Arts & Entertainment/Entertainment Industry/Recording Industry
dejurin / docker-compose.yml
Created Apr 22, 2022
How to Deploy Wordpress with Docker (WordPress/MariaDB/Adminer)
View docker-compose.yml
version: "3.9"
image: mariadb:latest
platform: linux/amd64
- ./db_data:/var/lib/mysql
restart: always
dejurin /
Last active Feb 18, 2022
Get start and end points for: week, month, quarter and year
from datetime import date
from dateutil.relativedelta import relativedelta
def start_end_day(sunmon: bool = True):
today =
curr_quarter = int((today.month - 1) / 3 + 1)
dayofweek = [today.weekday(),today.isoweekday()][sunmon]
week_start = today - relativedelta(days=dayofweek)
dejurin /
Created Dec 3, 2021 — forked from irazasyed/
Solution for MySQL / MariaDB Start Issue on MacOS

Solution for MySQL / MariaDB Start Issue on MacOS


On trying to start mysql.server start

./usr/local/bin/mysql.server: line 264: kill: (12262) - No such process ERROR!

dejurin /
Last active Oct 17, 2021
Starlette Jinja2Templates add relative URL (url_path_for)
#Add to class Jinja2Templates:
def url_path_for(context: dict, name: str, **path_params: typing.Any) -> str:
request = context["request"]
router = request.scope["router"]
return router.url_path_for(name, **path_params)
env.globals["url_path_for"] = url_path_for
dejurin / jsInputFilter.html
Last active Oct 1, 2021
JavaScript input filter showcase
View jsInputFilter.html
<!-- -->
<!-- -->
<h2>JavaScript input filter showcase</h2>
<p>Supports Copy+Paste, Drag+Drop, keyboard shortcuts, context menu operations, non-typeable keys, the caret position, different keyboard layouts, and <a href="" target="_blank">all browsers since IE 9</a>.</p>
<p>There is also a <a href="" target="_blank">jQuery version</a> of this.</p>
<tr><td>Integer</td><td><input id="intTextBox"></td></tr>
<tr><td>Integer &gt;= 0</td><td><input id="uintTextBox"></td></tr>
<tr><td>Integer &gt;= 0 and &lt;= 500</td><td><input id="intLimitTextBox"></td></tr>
dejurin /
Created Sep 27, 2021 — forked from lancejpollard/
Complete List of HTML Meta Tags
dejurin / isElementInViewport.js
Created Sep 7, 2021 — forked from davidtheclark/isElementInViewport.js
JavaScript: Is element in viewport?
View isElementInViewport.js
No jQuery necessary.
Thanks to Dan's StackOverflow answer for this:
function isElementInViewport(el) {
var rect = el.getBoundingClientRect();
return ( >= 0 &&