Skip to content

Instantly share code, notes, and snippets.

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

Artem Amixp

🏠
Working from home
  • Alaska
View GitHub Profile
@Amixp
Amixp / install-jetbrains-toolbox.sh
Created October 7, 2022 07:23 — forked from abn/install-jetbrains-toolbox.sh
Install JetBrains Toolbox App
#!/usr/bin/env bash
# Reference: https://github.com/nagygergo/jetbrains-toolbox-install/blob/master/jetbrains-toolbox.sh
# Note that we grep for linux here, if you are using this on mac/windows please see json output
TOOLBOX_URL=$(curl --silent 'https://data.services.jetbrains.com//products/releases?code=TBA&latest=true&type=release' \
-H 'Origin: https://www.jetbrains.com' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Accept-Language: en-US,en;q=0.8' \
-H 'Accept: application/json, text/javascript, */*; q=0.01' \
-H 'Referer: https://www.jetbrains.com/toolbox/download/' \
@Amixp
Amixp / gist:3fa8ad92270f2a430082525335cb84eb
Created September 22, 2022 12:07 — forked from juanje/gist:3797297
Mount apt cache of a Vagrant box in the host to spin up the packages installation

This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.

I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial (it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.

def local_cache(basebox_name)
  cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
  partial_dir = cache_dir.join('partial')
  partial_dir.mkdir unless partial_dir.exist?
 cache_dir
@Amixp
Amixp / get-pmm.sh
Created December 28, 2021 16:55 — forked from askomorokhov/get-pmm.sh
PMM setup
#!/bin/sh
# ###############################
# Script to run PMM2
# curl -fsSL https://gist.githubusercontent.com/askomorokhov/62ade5f05fe1c1cad0ae32664369d266/raw/d589ae2a24881cc8e52a9026aabec6e4a92f1f38/get-pmm.sh -o get-pmm2.sh ; chmod +x get-pmm2.sh ; ./get-pmm2.sh
#
#################################
set -o errexit
#set -o xtrace
@Amixp
Amixp / ipv4.md
Created December 6, 2021 08:26 — forked from hemanth22/ipv4.md
ipv4 subnet mask cheatsheet

IPv4 Subnet Mask Cheat Sheet

Subnet Mask Addresses Hosts Netmask Amount of a Class C
/30 4 2 255.255.255.252 1/64
/29 8 6 255.255.255.248 1/32
/28 16 14 255.255.255.240 1/16
/27 32 30 255.255.255.224 1/8
/26 64 62 255.255.255.192 1/4
@Amixp
Amixp / CodeMonk_Part#Man.sql
Created April 9, 2020 06:33 — forked from CodMonk/CodeMonk_Part#Man.sql
MySQL Stored Procedure for Table Partitioning
CREATE DEFINER=`root`@`localhost` PROCEDURE `Cmonk_partition_manager`(in partition_frequency varchar(100), in db_schema varchar(100),in input_table_name varchar(100), in partition_column varchar(100))
BEGIN
-- Author - Code Monk
-- Version - 1.0
-- Procedure for automated partitioning of table
-- Inputs :
-- 1- Partition_frequency : Options-(Daily,Monthly,Weekly)
-- 2- db_schema : Name of Database schema
-- 3- input_table_name : Table Name
@Amixp
Amixp / ! Windows NXLog | Linux NXLog | LogStash
Created October 30, 2018 13:27 — forked from MattHodge/! Windows NXLog | Linux NXLog | LogStash
Configuration files for NXLog on Windows ---> NXLog on Ubuntu --> LogStash
Covers configuration for NXLog installed on Windows, transfering to NXLog installed on Linux to LogStash.
NXLog is used for IIS logs. (http://nxlog-ce.sourceforge.net/)
Snare is used for Windows Event Logs. (http://www.intersectalliance.com/projects/SnareWindows/index.html#Download)
@Amixp
Amixp / managedsoftwareupdate
Created December 13, 2016 13:40 — forked from bruienne/managedsoftwareupdate
Updated managedsoftwareupdate (v2.3.0 tag) with socket triggering of user notification instead of file-based
#!/usr/bin/python
# encoding: utf-8
#
# Copyright 2009-2014 Greg Neagle.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0