Skip to content

Instantly share code, notes, and snippets.

View maxiko's full-sized avatar

Maxim Ignatenko maxiko

View GitHub Profile
/* Sleep Demo Serial
* -----------------
* Example code to demonstrate the sleep functions in a Arduino. Arduino will wake up
* when new data is received in the serial port USART
* Based on Sleep Demo Serial from http://www.arduino.cc/playground/Learning/ArduinoSleepCode
*
* Copyright (C) 2006 MacSimski 2006-12-30
* Copyright (C) 2007 D. Cuartielles 2007-07-08 - Mexico DF
*
* With modifications from Ruben Laguna 2008-10-15
@maxiko
maxiko / receiver.ino
Created September 23, 2015 09:51 — forked from rlogiacco/receiver.ino
nRF24 multiple transmitters
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
int senderId;
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
//Contacts from the radio to connect NRF24L01 pinamnam -> Arduino
@maxiko
maxiko / attiny13-adc-pwm.c
Created February 11, 2016 05:49 — forked from adnbr/attiny13-adc-pwm.c
ADC input directly to PWM output, on an ATtiny13.
/* ---------------------------------------------------------------------
* PWM LED Brightness control for ATtiny13.
* Datasheet for ATtiny13: http://www.atmel.com/images/doc2535.pdf
*
* Pin configuration -
* PB1/OC0B: LED output (Pin 6)
* PB2/ADC1: Potentiometer input (Pin 7)
*
* ~100 bytes.
*
@maxiko
maxiko / .gitlab-ci.yml
Created May 2, 2018 10:11 — forked from abdullah353/.gitlab-ci.yml
Basic skeleton of Gitlab CI integration with AWS Lambda for auto deployments.
image: docker:latest
before_script:
- apt-get update -y # Updating the Ubuntu Docker instance.
- python -V # Print out python version for debugging.
- apt install -y zip jq
- pip install awscli --upgrade --user
- export PATH=~/.local/bin:$PATH # Required for awscli.
- aws --version # Print out aws cli version for debugging.
@maxiko
maxiko / gist:04359afb775b14006e794689049b11f5
Created August 1, 2018 11:53 — forked from carlspring/gist:6762356
TeamCity REST API Commands
@maxiko
maxiko / psql_useful_stat_queries.sql
Created November 28, 2018 07:40 — forked from anvk/psql_useful_stat_queries.sql
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@maxiko
maxiko / SimpleTcpRedirector.py
Created December 19, 2018 11:17 — forked from sivachandran/SimpleTcpRedirector.py
A simple TCP redirector in python
#!/usr/bin/env python
import socket
import threading
import select
import sys
terminateAll = False
class ClientThread(threading.Thread):
@maxiko
maxiko / IntelIJTrialReset.sh
Created March 5, 2019 05:12
How to reset IntelIJ IDEA Evaluation Key in Linux
#!/bin/sh
rm ~/.IntelliJIdea*/config/eval/idea*.evaluation.key && \
sed -i '/evlsprt/d' ~/.IntelliJIdea*/config/options/other.xml && \
rm -rf ~/.java/.userPrefs/jetbrains
# It is Highly Advised to Purchase the JetBrain Softwares
# This is only for the case You just want to Extend the
# Trial Period and Evaluate the IDE for some more Time
@maxiko
maxiko / build.gradle
Created January 13, 2021 18:17 — forked from quidryan/build.gradle
Code to use ssh-agent when using JGit. Running in Gradle with the gradle-git plugin.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.ajoberstar:gradle-git:0.5.0' // not used in this example, but it's what brings in JGit
classpath 'com.jcraft:jsch.agentproxy.jsch:0.0.5'
classpath 'com.jcraft:jsch.agentproxy.usocket-jna:0.0.5'
classpath 'com.jcraft:jsch.agentproxy.sshagent:0.0.5'
}