Skip to content

Instantly share code, notes, and snippets.

@imDaniX
imDaniX / README Антимат.md
Last active April 16, 2024 18:28
Мат фильтр | Регулярка антимат

Регулярное выражение для нахождения русского мата в тексте. Использовать следует только для первичной модерации, ибо обходится нажатием в одну клавишу. Если вам требуется полноценный фильтра мата, советую прибегнуть к программному пути создания такового, найти третье API, или просто остановиться на ручной модерации.

Выражение писалось в первую очередь с оглядкой на регулярки Java - для других языков может потребоваться адаптация.

Основа регулярного выражения

\b(
((у|[нз]а|(хитро|не)?вз?[ыьъ]|с[ьъ]|(и|ра)[зс]ъ?|(о[тб]|п[оа]д)[ьъ]?|(.\B)+?[оаеи-])-?)?(
  [её](б(?!о[рй]|рач)|п[уа](ц|тс))|
  и[пб][ае][тцд][ьъ]
@eloypnd
eloypnd / dnsmasq_setup_osx.md
Last active March 23, 2024 00:25
wildcard DNS record on OS X in localhost development with dnsmasq

wildcard DNS in localhost development

$ brew install dnsmasq
   ...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@jayj
jayj / flexbox.less
Last active November 20, 2023 04:51
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
@leostratus
leostratus / webkit-pseudo-elements.md
Created September 21, 2012 01:44
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@badsyntax
badsyntax / labelled_marker.js
Created April 12, 2012 09:45
Google Maps V3 Labelled Marker
/*
* An example of how to use a Google Map overlay to display a label on top of marker.
* This is a slight re-work of http://www.tdmarketing.co.nz/blog/2011/03/09/create-marker-with-custom-labels-in-google-maps-api-v3/
* I suggest you rather view that blog post, this code is pasted here purely for my own personal reference.
*/
var
point = {
lat: 37.8478115,
long: 15.2934327
@wheresalice
wheresalice / .htaccess
Created February 25, 2011 15:56
webfont .htaccess rules
# ----------------------------------------------------------------------
# Webfont access
# ----------------------------------------------------------------------
# allow access from all domains for webfonts
# alternatively you could only whitelist
# your subdomains like "sub.domain.com"
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>