Skip to content

Instantly share code, notes, and snippets.

View cocolacre's full-sized avatar
💭
cyberbiosecurity enjoyer

Vadim Smirnov cocolacre

💭
cyberbiosecurity enjoyer
View GitHub Profile
@cocolacre
cocolacre / WinVim.cmd
Created July 20, 2021 19:46
gr1m made a simple VIM clone from batch to satisfy your needs.
::I needed a absolute minimal console text editor for windows. 2 minutes of googling brought me here:
::https://stackoverflow.com/questions/19497399/basic-text-editor-in-command-prompt
@echo off
title WinVim
color a
cls
echo WinVim 1.02
echo.
echo To save press CTRL+Z then press enter
echo.
#####################################################################
####### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#######
####### Use DOUBLE QUOTES in CMD line in Dockerfile! #######
####### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#######
#####################################################################
sudo apt install apt-transport-https
#Нужная штука?
sudo systemctl status docker
@cocolacre
cocolacre / bezdraw.py
Created April 22, 2021 04:16 — forked from Alquimista/bezdraw.py
Draw Bezier curves using Python and PyQt
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math
from PyQt4 import QtGui, QtCore
def binomial(i, n):
class A():
def __init__(self):
print("Hello from A!")
pass
class B():
def __init__(self):
print("Hello from B!")
class C(A,B):
def __init__(self):
sudo apt-get autoclean
sudo apt-get autoremove
rm /var/cache/apt/archives/*
sudo apt-get clean
journalctl --vacuum-time=3d

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

Предположим, что при достижении стола - показания высоты h1_laser_latest
с лазера сразу уменьшаются на величину, равную высоте стола.
{1.5, 1.5,1.5,1.5,1.5,1.5,1.5, 0.8 ,0.8,0.8}
Чуть обобщим задачу - допустим (не строго, как обезьяна, т.е. то буду принимать во внимание наличие точных чисел в задаче,
то не буду, а там разберемся на втором круге решения.),
конкретные размеры участков траектории\координаты и форма препятствий нам не известны.
(не будем же мы хардкодить выход за константные значения).
bool ABOVE_OBSTACLE = True;
... прочие инициализации;
Начинаем цикл.
@cocolacre
cocolacre / windows_defs.py
Created May 23, 2018 20:41
windows API constants
# https://github.com/huangzx/swin/tree/807df36dd4ef53fdf797a19894f7e5d68891e429/src/winui
# Copyright (c) 2007, 2008 Agostino Russo
#
# Written by Agostino Russo <agostino.russo@gmail.com>
# Mostly copied from win32con.py
#
# winui is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
@cocolacre
cocolacre / openvpn_on_google_cloud.md
Created April 16, 2018 14:03 — forked from neuni/openvpn_on_google_cloud.md
Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)

Install openVPN server on Google Cloud using Pritunl

Purpose:

Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)

Create instance

  • Create new instance in default network
  • Chosse Ubuntu 16.04 LTS
@cocolacre
cocolacre / centos7.sh
Created December 10, 2017 22:11 — forked from yyang/centos7.sh
centos 7 pptpd firewalld
#!/bin/sh
#
# pptpd installation script on my own CentOS 7 box.
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules
#
# Author: 2015 Steve Yang <me@iyyang.com>
# The script comes with ABSOLUTELY NO WARRANTY.