# nano /etc/default/crio
HTTP_PROXY=http://127.0.0.1:8118
ALL_PROXY=http://127.0.0.1:8118
HTTPS_PROXY=http://127.0.0.1:8118
NO_PROXY=localhost,10.96.0.0/12,192.168.0.0/16,172.16.0.0/12,127.0.0.0/8,<SERVER'S IP> # append any other IPs/domains to not go through the proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/apt/apt.conf.d/12proxy | |
Acquire::http::proxy "socks5h://127.0.0.1:9999"; | |
Acquire::https::proxy "socks5h://127.0.0.1:9999"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nano ~/.config/xfce4/terminal/accels.scm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sstream> | |
#include <unistd.h> | |
#include <string.h> | |
#include <iostream> | |
#include <arpa/inet.h> | |
#include <sys/socket.h> | |
#include <unordered_map> | |
#include <openssl/ssl.h> | |
#include <openssl/err.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# follow `https://www.elastic.co/guide/en/kibana/current/docker.html#run-kibana-on-docker-for-dev` instructions for | |
# installing ES using docker | |
function run-docker-es() { | |
# remove any already running es instance | |
docker ps -af "name=elasticsearch" -q 2>/dev/null | xargs docker rm &>/dev/null | |
# launch the ES with 1GB memory limit and 3 core | |
docker run --name elasticsearch \ | |
--net elastic \ | |
-p 9200:9200 \ |
Create the config file:
mkdir -p /etc/systemd/system/docker.service.d && \
vi /etc/systemd/system/docker.service.d/http-proxy.conf
Put up the configs:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install -y wget && \ | |
wget 'https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-client-plugins_8.0.25-1ubuntu20.04_amd64.deb' && \ | |
wget 'https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn9_8.0.25-1ubuntu20.04_amd64.deb' && \ | |
wget 'https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn8-2_8.0.25-1ubuntu20.04_amd64.deb' && \ | |
wget 'https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn-dev_8.0.25-1ubuntu20.04_amd64.deb' && \ | |
dpkg -i mysql-community-client-plugins_8.0.25-1ubuntu20.04_amd64.deb && \ | |
dpkg -i libmysqlcppconn9_8.0.25-1ubuntu20.04_amd64.deb && \ | |
dpkg -i libmysqlcppconn8-2_8.0.25-1ubuntu20.04_amd64.deb && \ | |
dpkg -i libmysqlcppconn-dev_8.0.25-1ubuntu20.04_amd64.deb && \ | |
apt-get install -y libmysqlcppconn-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/asio/ip/address.hpp> | |
#include <boost/multiprecision/cpp_int.hpp> | |
using big_int = boost::multiprecision::cpp_int; | |
big_int ip2long(const std::string&); | |
int main(int, char**) { | |
const auto | |
fals = "xxx.xxx.x.x", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
ENV['TZ'] = 'UTC' | |
require 'rubygems' | |
require 'active_support/core_ext/object/blank' | |
require 'nokogiri' | |
require 'net/http' | |
require 'byebug' | |
require 'logger' | |
require 'uri' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To "fix" an old commit with a small change, without changing the commit message | |
# of the old commit, where OLDCOMMIT is something like 091b73a: | |
# Copied from `https://stackoverflow.com/a/27721031/1198291` | |
git add <my fixed files> | |
git commit --fixup=OLDCOMMIT | |
git rebase --interactive --autosquash OLDCOMMIT^ # at here do noting and exit from editor, it will do the job |
NewerOlder