Skip to content

Instantly share code, notes, and snippets.

#bootloader
sudo avrdude -c usbasp -p m328p -u -U flash:w:atmega328.hex
#write fuses w/o unlock_bits
sudo avrdude -c usbasp -p m328p -e -U lock:w:0x0F:m -U efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m
#read fuses
sudo avrdude -c usbasp -p m328p -U hfuse:r:h.txt:s -U lfuse:r:l.txt:s

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Capybara

save_and_open_page

Matchers

have_button(locator)
Atom config
@kalkov
kalkov / postgres-cheatsheet.md
Created November 24, 2017 12:42 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@kalkov
kalkov / ethminer_ubuntu_nvidia.md
Created December 14, 2017 03:05 — forked from johnstcn/ethminer_ubuntu_nvidia.md
NVIDIA/CUDA ethminer setup under Ubuntu Server 16.04

Headless Ethminer (nVidia) Setup Guide

Cian Johnston, July 2017

A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.

This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.

The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.

Hardware

Steve McCurry
David Alan Harvey
Sebastião Ribeiro Salgado
Joe Buissink
Elliott Erwitt
Jerry Ghionis
Víctor Lax
Pedro Cabrera
William Lambelet
Fer Juaristi
@kalkov
kalkov / curl.md
Created November 7, 2018 09:36 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@kalkov
kalkov / tlp
Created August 21, 2019 09:09 — forked from pauloromeira/tlp
My TLP config file (/etc/default/tlp) for ThinkPad
# ------------------------------------------------------------------------------
# tlp - Parameters for power saving
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
# dir: /etc/default/tlp
# Hint: some features are disabled by default, remove the leading # to enable
# them.
# Set to 0 to disable, 1 to enable TLP.
@kalkov
kalkov / install virtualenv ubuntu 16.04.md
Created October 1, 2019 15:12 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv