Skip to content

Instantly share code, notes, and snippets.

Alexey Murz Korepov MurzNN

Block or report user

Report or block MurzNN

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adrianlzt
adrianlzt / sharescreen
Created Feb 7, 2019
Scripts to share only a portion of the screen
View sharescreen
#!/bin/bash
# Modified version of https://github.com/Ashark/hliss/blob/master/vlc-hangouts
# Script to share a portion of the screen in VLC to be used by Chrome/Firefox to share the screen
# By default, when run, it asks to click in some window. The area of that window is what is going to be shared.
# If executed with "sharescreen area", it asks for a portion of the screen to be shared.
unset x y w h
# Old code to choose a monitor
View riot-color-scheme.md

Setting a default color scheme (tint) for Riot on your account

Caution: This requires some amount of technical knowledge about how matrix/riot works.

For reference, the original grey color scheme in Riot had a primary color of #595959 and a secondary color of #ececec

  1. Open the developer tools by typing /devtools
  2. Click the "Explore Account Data" button
  3. Click the "im.vector.web.settings" button (if you don't have this button, use the instructions below instead)
@stecman
stecman / _readme.md
Last active Dec 26, 2017
List BTRFS subvolume and snapshot sizes like df
View _readme.md
@tetrapus
tetrapus / color-tabs.css
Last active Jul 2, 2018
Coloured tabs for TST
View color-tabs.css
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/* override base tab color */
:root:root {
--color-100: white;
}
/* Plain */
.tabbrowser-tab {
--color-main: var(--color-100);
View tag_room.sh
# This should be the public-facing name (ie: dns name)
HOME_SERVER_URL="https://matrix.org"
# The room ID is NOT the room alias. The ID can be found at the bottom of the room settings dialog in riot-web
ROOM_ID="!AbCDef823s:matrix.org"
# This is your user ID and access token. The access token must match the user.
USER_ID="@turt2live:matrix.org" # The home server should match this domain as well (ie: t2l.io as a HS should be :t2l.io in the user)
ACCESS_TOKEN="token_here"
@sanks
sanks / yandex-maps-example.js
Last active Jan 16, 2019
Getting user region and city with Yandex.Maps API
View yandex-maps-example.js
ymaps.ready(function () {
ymaps.geolocation.get({ provider: 'yandex' }).then(function(result) {
var data = result.geoObjects.get(0).properties.get('metaDataProperty').GeocoderMetaData;
var administrativeAreaName = data.AddressDetails.Country.AdministrativeArea.AdministrativeAreaName; // region
if ('SubAdministrativeArea' in data.AddressDetails.Country.AdministrativeArea) {
var localityName = data.AddressDetails.Country.AdministrativeArea.SubAdministrativeArea.Locality.LocalityName; // city
} else {
var localityName = data.AddressDetails.Country.AdministrativeArea.Locality.LocalityName; // city
@mrded
mrded / foo.module
Created Oct 31, 2013
Drupal: Taxonomy terms as autocomplete using form API.
View foo.module
<?php
function bar_form($form, &$state) {
$form['bar'] = array(
'#type' => 'textfield',
'#title' => t('Bar'),
'#autocomplete_path' => 'taxonomy/autocomplete/field_bar_term', // Field name here.
'#element_validate' => array('foo_taxonomy_autocomplete_validate'),
);
@fomigo
fomigo / gist:2382775
Created Apr 14, 2012
Russian Plural Form in PHP
View gist:2382775
<?php
/*
echo plural_form(42, array('арбуз', 'арбуза', 'арбузов'));
*/
function plural_form($n, $forms) {
return $n%10==1&&$n%100!=11?$forms[0]:($n%10>=2&&$n%10<=4&&($n%100<10||$n%100>=20)?$forms[1]:$forms[2]);
}
You can’t perform that action at this time.