Skip to content

Instantly share code, notes, and snippets.

View mbarouski's full-sized avatar
🏠
Working from home

Maksim Barouski mbarouski

🏠
Working from home
View GitHub Profile
@iamtonny
iamtonny / extensions.py
Created March 9, 2019 20:07
How to find extension classes. Python
import sys
import inspect
class A:
pass
class B(A):
pass
@GMMan
GMMan / ubuntu-gl502vs.md
Last active June 5, 2025 06:30
Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

NVIDIA Graphics

Nouveau does not appear to support Pascal cards right now, so you should use the proprietary NVIDIA driver, available from the Additional Drivers applet.

Panel Dithering

@vital101
vital101 / nodegit.js
Created September 26, 2016 10:36
NodeGit Clone Private with Token
const repo = 'vital101/kernl-example-plugin-gitub';
const token = 'my-token-from-oauth';
const cloneURL = `https://${token}:[email protected]/${repository}`;
const cloneOptions = {
fetchOpts: {
callbacks: {
certificateCheck: () => { return 1; },
credentials: () => {
return NodeGit.Cred.userpassPlaintextNew(token, 'x-oauth-basic');
}
@evanwill
evanwill / gitBash_windows.md
Last active January 11, 2026 21:41
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@cgmartin
cgmartin / logging-middleware.js
Created May 24, 2015 01:43
Morgan JSON log format example
'use strict';
var morgan = require('morgan');
var os = require('os');
morgan.token('conversation-id', function getConversationId(req) {
return req.conversationId;
});
morgan.token('session-id', function getSessionId(req) {
return req.sessionId;
@calvindavis
calvindavis / cypher-toggle-relationship
Created June 27, 2013 13:38
Cypher query for toggling a relationship between two nodes.
START calvin = node(1), sophie = node(2)
CREATE (calvin)-[:LIKES]->(sophie)
MATCH (calvin)-[r:LIKES]->(sophie), (calvin)-[:LIKES]->(sophie)
DELETE r
RETURN count(r) = 1 AS likes