Skip to content

Instantly share code, notes, and snippets.

View rdnvndr's full-sized avatar

Andrey Rodionov rdnvndr

View GitHub Profile
@olih
olih / jq-cheetsheet.md
Last active June 25, 2026 07:27
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@chris-pilcher
chris-pilcher / TFSCommandLineMac.md
Last active August 17, 2023 09:52
Using TFS Online TFVC with command-line TFS utility on Mac

Install Command-Line TFS using HomeBrew on a Mac

Install Team Explorer Everywhere Command Line Client

  • Press Command+Space and type Terminal and press enter/return key.
  • Install HomeBrew by running command in Terminal app
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
  • Run:
@ezekg
ezekg / regex.md
Created September 25, 2015 19:09
Regex

The following should be escaped if you are trying to match that character

\ ^ . $ | ( ) [ ]
* + ? { } ,

Special Character Definitions

  • \ Quote the next metacharacter
  • ^ Match the beginning of the line
@adam-p
adam-p / Local PR test and merge.md
Last active April 19, 2026 06:59
Testing a pull request, then merging locally; and avoiding TOCTOU

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37
@Temptationx
Temptationx / disconnect.c++
Last active March 14, 2019 19:20
C++ lambda Qt disconnect
auto conn = std::make_shared<QMetaObject::Connection>();
*conn = QObject::connect(obj, &Object::signal, this, [this, conn]() {
disconnect(*conn);
});
@rkmax
rkmax / enable-remote.sh
Created November 18, 2014 23:50
Setup a virtual screen for connect from VNC viewer (example VNC VIwer Android)
#!/bin/bash
WIDTH=1280
HEIGHT=800
x11_cmd=x11vnc
if [[ ! -z $(pgrep ${x11_cmd}) ]]; then
pkill ${x11_cmd}
fi
@Youka
Youka / lua_myobject.cpp
Last active June 3, 2026 03:16
Example of Lua in C++ and userdata objects
// Lua C API
#include <lua.hpp>
// C++ input/output streams
#include <iostream>
// MyObject as C++ class
class MyObject{
private:
double x;
public:
@martylouis
martylouis / markdown-cheatsheet.md
Created August 7, 2014 19:46
Markdown Cheatsheet

Sample Markdown Cheat Sheet

This is a sample markdown file to help you write Markdown quickly :)

If you use the fabulous [Sublime Text 2/3 editor][ST] along with the [Markdown Preview plugin][MarkdownPreview], open your ST2 Palette with CMD+⇧+P then choose Markdown Preview in browser to see the result in your browser.

Text basics

this is italic and this is bold . another italic and another bold

@vitorbritto
vitorbritto / regex.md
Last active July 9, 2026 21:43
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping