Skip to content

Instantly share code, notes, and snippets.

View mariohuq's full-sized avatar

Dmitry Kondraev mariohuq

View GitHub Profile
@ChristopherA
ChristopherA / Mermaid_on_Github_Examples.md
Last active November 15, 2024 14:33
Mermaid on Github Examples

Mermaid on Github Examples

All of these diagrams are dynamically rendered during html display by Github, the images generated from text inside the Github-Flavored Markdown. None are static images. Mermaid support was released for Github on 2022-02-14

Pros & Cons:

  • Pro: You don't need to care about the layout.
  • Con: You cannot control the layout.

Notes:

  • Not all the features of Mermaid (in particular symbols B-->C[fa:fa-ban forbidden], hyperlink and tooltips) are supported by Github.

A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example

Curating Complexity: A Guide to Big-O Notation


A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example

Curating Complexity: A Guide to Big-O Notation

@OleksiyRudenko
OleksiyRudenko / github-UI-tips-n-tricks.md
Last active December 11, 2021 13:29
GitHub tips and tricks

Fuzzy file finder

On any repo press t to start fuzzy file finder

Code snippet:

  • Open a file
  • Select a code line
  • SHIFT+LeftClick to select multiple
  • RightClick for context menu + Copy permalink or press y It renders nicely when in an issue comment
@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active November 18, 2024 13:42
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
@chuv1
chuv1 / tgEntitiesToHTML.php
Last active November 18, 2023 09:37
Test function to convert telegram message entities into HTML markup.
public function getHTML($without_cmd = false){
if(empty($this->getEntities())){
return $this->getText($without_cmd);
}
$text = $this->getText();
$html = '';
$entities_count = \count($this->getEntities())-1;
@vmosoti
vmosoti / install_predis.sh
Created January 29, 2018 12:49 — forked from palpalani/install_predis.sh
Installing Redis, Hiredis on Ubuntu 14.04
#!/bin/bash
echo "--------------------------------------------------------------------------------------------"
echo "Installing Predis on Ubuntu 16.04"
echo "Read more: https://github.com/nrk/predis"
echo "Author: Ralf Rottmann | @ralf | http://rottmann.net"
echo "--------------------------------------------------------------------------------------------"
PHP_CONF_DIR="/etc/php/7.0/apache2/conf.d"
echo "Checking prerequisites..."
echo "Git available?"
[ ! -s /usr/bin/git ] && sudo apt-get -q -y install git || echo "Git already installed."
anonymous
anonymous / LogDemo.java
Created September 28, 2016 18:21
package org.stepic.java.module4.logdemo;
import java.util.logging.*;
import java.util.Arrays;
/**
* Created by vitaly on 28/09/16.
*/
public class LogDemo {
private static final Logger LOGGER = Logger.getLogger(LogDemo.class.getName());
@demkinmaxim
demkinmaxim / calltouch-platformalp.js
Created August 15, 2016 14:42
Calltouch Platformalp.ru modified code
(function (w, d, e) {
var a = 'all', b = 'tou', src = b + 'c' + 'h';
src = 'm' + 'o' + 'd.c' + a + src;
var jsHost = "https://" + src, s = d.createElement(e), p = d.getElementsByTagName(e)[0];
s.async = 1;
s.src = jsHost + "." + "r" + "u/d_client.js?param;ref" + escape(d.referrer) + ";url" + escape(d.URL) + ";cook" + escape(d.cookie) + ";";
if (!w.jQuery) {
var jq = d.createElement(e);
jq.src = jsHost + "." + "r" + 'u/js/jquery-1.7.min.js';
jq.onload = function () {
@subfuzion
subfuzion / global-gitignore.md
Last active November 18, 2024 11:13
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.