Skip to content

Instantly share code, notes, and snippets.

View bartmika's full-sized avatar

Bartlomiej Mika bartmika

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bartmika on github.
  • I am bmika (https://keybase.io/bmika) on keybase.
  • I have a public key ASA8xhiSbtrgo75u9jlGQUApOHPR3l00RG70umkGGpbUYQo

To claim this, I am signing this object:

@bartmika
bartmika / ajax_w_django_json_response_view.md
Created October 24, 2019 17:04
Example of using Javascript AJAX (XMLHttpRequest) with Django JsonResponse View

Example of using Javascript AJAX (XMLHttpRequest) with Django JsonResponse View

mkdir ajax_django_example
cd ajax_django_example/
virtualenv env
source env/bin/activate
python --version
pip install django
django-admin startproject example

How to setup Peercoin on Raspberry Pi for headless minting

This guide assumes the following:

  • You've downloaded Raspbian Lite ISO image.
  • You've burn the image on the SDCard and you have some experiencethe working with the Raspberry Pi computer
  • You've installed Peercoin on your computer and you want to transfer your wallet.dat file to your Raspberry Pi computer.

This guide has been confirmed working on:

@bartmika
bartmika / raspberry-pi-serial-communication-using-adafruit-bluetooth-le-friend-usb.md
Last active December 16, 2022 06:20
Raspberry Pi Serial Communication over Bluetooth LE using Adafruit Bluefruit LE Friend for Python Programming

Raspberry Pi Serial Communication over Bluetooth LE using Adafruit Bluefruit LE Friend for Python Programming

Do you want to use the bluetooth interface for a Python programming project but you don't want to deal with the complexity involving bluetooth? This guide will help you.

The purpose of this guide is to demonstrate how to do write a program in Python which will do serial communication over Bluetooth for the Raspberry Pi.

The Adafruit Bluefruit LE Friend has FDTI chipset that works out of the box on Raspberry Pi which is useful for simplicity. (1)

This guide assumes you've just setup Rasbpian and have done nothing else.

Instructions

@bartmika
bartmika / messagepack_with_django_rest_and_axios.md
Last active April 1, 2020 07:38
How to use MessagePack with Django REST Framework and Axios

How to use MessagePack with Django REST Framework and Axios

Part 1 of 2: Django Backend

1. Setup Project

  1. Go to the django-rest-framework-msgpack library and have a look around. This is the main library we will be using to implement the MessagePack serializing and deseerializing. Just spend time reading the developer documentation.

  2. Setup our Django example project by running the following:

virtualenv -p python3.6 env
@bartmika
bartmika / setup_nheqminer_cuda_tromp_on_ubuntu.md
Last active August 13, 2018 17:32
Tutorial on how to setup "nheqminer" Zcash miner on Ubuntu 16 LTS with CUDA GPU
@bartmika
bartmika / setup_python_stuff_for_macos.md
Last active November 17, 2016 10:16
A HOWTO guide for setting up Python 3.x+ on MacOS.

Setup brew, Python 3, Pip, VirtualEnv, Postgres, gettext, memcached, SSH in MacOS Sierra

By: Bartlomiej Mika at https://mikasoftware.com Date: Oct, 13th, 2016

brew

  1. Install Xcode from the Apple App Store.

  2. Install the Command Line Tools of Xcode. Open a Terminal and type:

$ xcode-select --install
@bartmika
bartmika / RemoveRaspberryPiBitMessageServer.md
Last active December 10, 2015 02:56
Remove Raspberry Pi BitMessage Server

Remote Raspberry Pi BitMessage Server

Description

The following instruction set explains how to setup a remote server running BitMessage on the RaspberryPi.

Raspberry Pi Setup

  1. Download and install RASPBIAN JESSIE. Please make sure the following criteria are applied:
  • Make sure you "Expand Filesystem"
  • Make "Boot Options" to be "Console Only"
  • Change your password
@bartmika
bartmika / FreeBSD+Memcached.md
Last active August 19, 2022 13:44
Instructions on setting up memcached on FreeBSD and OS X.

FreeBSD 10.2 + Memcached

The following instructions are used to setup Memcachd on your FreeBSD OS.

  1. Install from ports (1 of 3) if you plan on using PHP with caching:
cd /usr/ports/databases/pecl-memcache
make install clean
  1. Install from ports (2 of 3):

Useful FreeBSD Commands

who

This command shows who is currently logged onto the system.

screen

Description

screen will allow you to save your session, hang up, and at a later time reconnect and restart your session.

Install