Skip to content

Instantly share code, notes, and snippets.

View egormkn's full-sized avatar
☮️

Egor Makarenko egormkn

☮️
View GitHub Profile
START TRANSACTION
SELECT * FROM current_schema()
SELECT * FROM "information_schema"."tables" WHERE ("table_schema" = 'public' AND "table_name" = 'artist_credit') OR ("table_schema" = 'public' AND "table_name" = 'artist_credit_name') OR ("table_schema" = 'public' AND "table_name" = 'artist_image') OR ("table_schema" = 'public' AND "table_name" = 'release_type') OR ("table_schema" ='public' AND "table_name" = 'tag') OR ("table_schema" = 'public' AND "table_name" = 'language') OR ("table_schema" = 'public' AND "table_name" = 'work') OR ("table_schema" = 'public' AND "table_name" = 'recording') OR ("table_schema" = 'public' AND "table_name" = 'track') OR ("table_schema" = 'public' AND "table_name" = 'release') OR ("table_schema" = 'public' AND "table_name" = 'label') OR ("table_schema" = 'public' AND "table_name" = 'country') OR ("table_schema" = 'public' AND "table_name" = 'membership') OR ("table_schema" = 'public' AND "table_name" = 'artist') OR ("table_schema" = 'public' AND "table_name" = 'artist_alias') OR
echo -n > /etc/environment
sed -i 's/#\(baseurl=.*\)mirror\.centos\.org/\1vault.centos.org/g' /etc/yum.repos.d/CentOS-*.repo
sed -i 's/\(mirrorlist=\)/#\1/g' /etc/yum.repos.d/CentOS-*.repo
yum clean all
#include "mat.h" // from MATLAB
#include "matrix.h" // from MATLAB
#include "matio.h" // https://github.com/tbeu/matio
#include "string.h"
#include "stdlib.h"
/*
* Open a MAT-file "filename" using mode "mode". Return
* a pointer to a MATFile for use with other MAT API functions.
@egormkn
egormkn / firewall.bat
Last active December 2, 2018 08:49
iptables script
@echo off
echo "Enable firewall autostart"
sc config SharedAccess start= auto
echo "Start firewall service"
sc start SharedAccess
echo "Enable Windows Firewall"
netsh firewall set opmode mode= ENABLE
@egormkn
egormkn / foxxll_io_test.cpp
Created February 18, 2018 21:26
FOXXLL async IO test
#include <iostream>
#include <vector>
#include <omp.h>
#include <foxxll/io/request.hpp>
#include <foxxll/io/create_file.hpp>
#include <foxxll/io/request_operations.hpp>
#include <foxxll/common/aligned_alloc.hpp>