Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Githubing

George Melikov gmelikov

:octocat:
Githubing
View GitHub Profile
View web.telegram.org full width + misc.js
// ==UserScript==
// @name Fix Webogram width
// @namespace webogram.fixes
// @match https://web.telegram.org/*
// @version 2
// @grant none
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
@gmelikov
gmelikov / trello_json_to_txt.py
Created May 14, 2020
Convert trello json into text
View trello_json_to_txt.py
#!/usr/bin/env python3
import json
import sys
def main():
with open(sys.argv[1]) as infile:
data = json.load(infile)
lists = {}
@gmelikov
gmelikov / fill_screen.html
Last active Jan 30, 2018
html autozoom page for screen width
View fill_screen.html
Add to <head>:
```
<meta id="Viewport" name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<script type="text/javascript">
var ww=320; //maximum body size in pixels
var ratio = window.innerWidth / ww;
document.querySelector('meta[name="viewport"]').setAttribute("content", 'initial-scale=' + ratio + ', maximum-scale=' + ratio + ', minimum-scale=' + ratio + ', user-scalable=yes, width=' + ww);
</script>
```
@gmelikov
gmelikov / linux_intel_nvidia_cuda_overclock.md
Last active Jan 21, 2018
Linux: intel GPU as main and nvidia GPUS as CUDA with overclock
View linux_intel_nvidia_cuda_overclock.md

Main problem - nvidia-settings needs nvidia GPUs to be started in X.

Workaround - fake displays for nvidia driver in xorg.conf:

  1. nvidia-xconfig --enable-all-gpus

  2. edit /etc/X11/xorg.conf:

...
@gmelikov
gmelikov / equalheight.js
Last active Apr 13, 2017
js function - Make inline divs the same height and fill it.
View equalheight.js
/**
* Make inline divs the same height and fill it.
* @param {string} container - selector string of parent container.
* @param {string} [blocktobottom] - selector string of object to fill height.
*/
equalheight = function(container, blocktobottom) {
function fillinside($el, currentTallest, blocktobottom) {
if (typeof blocktobottom !== 'undefined' && $el.height() < currentTallest) {
$el.find(blocktobottom).css('padding-top', ((currentTallest - $el.height()) + parseInt($el.find(blocktobottom).css('padding-top'), 10)));
@gmelikov
gmelikov / AppResolver.php
Last active Nov 16, 2015
asterisk+phpdaemon
View AppResolver.php
<?php
/**
* Default application resolver
*
* @package Core
* @author Zorin Vasily <maintainer@daemon.io>
*/
class MyAppResolver extends \PHPDaemon\Core\AppResolver {
View Documentation.md

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs