Skip to content

Instantly share code, notes, and snippets.

View RushOnline's full-sized avatar

Eugene RushOnline

  • Intech
  • Great Novgorod, Russia
View GitHub Profile
@RushOnline
RushOnline / config.toml
Created October 18, 2021 14:46 — forked from ryankurte/config.toml
Set gitlab runner to use git bash
[[runners]]
name = "tt708-windows"
url = "https://gitlab.com/"
token = "[REDACTED]"
executor = "shell"
shell = "bash"
builds_dir="/c/gitlab-runner/builds/"
cache_dir="/c/gitlab-runner/cache/"
[runners.cache]
[runners.cache.s3]
@RushOnline
RushOnline / keybindings.json
Created June 1, 2021 11:13
VSCode: close output window with escape
{
"key": "escape",
"command": "workbench.action.togglePanel",
"when": "inOutput"
}
@RushOnline
RushOnline / docker-snap-install.md
Created March 15, 2021 11:34
Install docker and docker-compose on Ubuntu 20.04
#  Install docker
sudo snap install docker

# Install completion
sudo curl \
  -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/bash/docker-compose \
  -o /etc/bash_completion.d/docker-compose
@RushOnline
RushOnline / README.md
Created February 15, 2021 22:40 — forked from sqeezy/README.md
PowerShell script to have all variables from vcvars32.bat from Visual Studio

Taken from here for prosperity.

Put this in %USERDIR%/Documents/WindowsPowerShell/profile.ps1, run a PowerShell terminal and you should see the messages "Visual Studio 2015..." pop up.

@RushOnline
RushOnline / mount_qcow2.md
Created February 25, 2020 00:05 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@RushOnline
RushOnline / default.pa.diff
Created August 20, 2018 19:48
Switch audio stream to bluetooth headphones/headset on connection
diff --git a/pulse/default.pa b/pulse/default.pa
index 9ebe05e..e95f423 100644
--- a/pulse/default.pa
+++ b/pulse/default.pa
@@ -30,7 +30,8 @@
### Automatically restore the volume of streams and devices
load-module module-device-restore
-load-module module-stream-restore
+load-module module-stream-restore restore_device=false
@RushOnline
RushOnline / chainparams.cpp
Created May 21, 2018 10:35
Hex dump altcoin/bitcoin genesis block header
CDataStream ds(SER_NETWORK, PROTOCOL_VERSION);
( (CBlockHeader*) &genesis )->Serialize(ds);
for(CDataStream::const_iterator it = ds.begin(); it != ds.end(); ++it) {
fprintf(stdout, "%02x", 0x00FF & *it);
}
fprintf(stdout, "\n");
exit(1);
# include to your server{}
location /sources/ {
allow 192.168.0.0/16; # infrastructure
deny all;
rewrite ^\/sources\/(.*)\/.*?\.(tar\.gz|zip|tar\.bz2|tar)$ /private/$1/archive.$2;
}
location /private/ {
@RushOnline
RushOnline / docker-images
Created April 9, 2018 11:17
Show docker images in a tree view
#!/bin/sh
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock nate/dockviz images -t
@RushOnline
RushOnline / Dockerfile
Created April 3, 2018 12:38 — forked from robertbasic/Dockerfile
Docker build for Qt 5.6.2 and Python 3.5.3 on CentOS 6.8
FROM centos:6.8
RUN yum -y install centos-release-scl && \
yum -y update && \
yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++ devtoolset-3-binutils \
curl tar perl make openssl-devel \
libxcb libxcb-devel xcb-util xcb-util-devel \
libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel \
xcb-util-image xcb-util-image-devel \
xcb-util-keysyms xcb-util-keysyms-devel \