Skip to content

Instantly share code, notes, and snippets.

@ressu
ressu / README.md
Last active March 12, 2024 11:24
Swapfile wrapper for memory hungry installations

Wrapper for swapfile on sdcard

This is a convenient wrapper script to run bash with a swapfile and temporary folder with more capacity. The need for this script comes from The 100 printers where Banana Pi M2 Zero needs to install numpy and other Python packages which have a memory hungry build process.

The script does the following thigs:

  • Sets up a swapfile and enables it
@ressu
ressu / Connect Box - Ressu-1626564430417.json
Created July 17, 2021 23:28
Connectbox modified dashboard
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
043c758ff4d4d076a414e77cfc06913e0dfa41954ad82f0f115cc6711cb15821c5db232a484cade0cd60ecf8d8e19ccd4ea742a355b11b80508328f11662bf3698

Keybase proof

I hereby claim:

  • I am ressu on github.
  • I am ressu (https://keybase.io/ressu) on keybase.
  • I have a public key ASDLbfvzLjkmMkpWAB9VV7V8Uiq1FeGqArkVLEg4Q1rx4wo

To claim this, I am signing this object:

set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
call neobundle#begin(expand('~/.vim/bundle'))
" Uncomment these lines to make the check work
" if has('python')
" endif
NeoBundle 'jaxbot/github-issues.vim', {'disabled': !has('python')}
call neobundle#end()
filetype plugin indent on
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
if has("eval")
call neobundle#begin(expand('~/.vim/bundle'))
NeoBundle 'Shougo/neobundle-vim-recipes', {'force': 1}
NeoBundleRecipe 'neobundle'
endif
class Class1:
def __init__(self, arg1, arg2):
print "Would do stuff with %s and %s" % (arg1, arg2)
class Class2(Class1):
def do_something(self):
print "I would do something else"
class Class3(Class1):
def __init__(self, arg1, arg2):

Installing python through pyenv

Pyenv is a tool to install and manage side by side python installations. It's generally used for development, but can be used for production environments as well.

Installing pyenv is simple, we can use the installer. The installer installs pyenv to ~/.pyenv along with tools to build various python versions.

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash

Follow the instructions given by the installer on how to enable the pyenv command.

" Modeline and Notes {
" vim:foldmarker={,} foldlevel=0 foldmethod=marker spell ft=vim
"
" This configuration file contains pretty much everything needed to make Vim
" play nice (or at least like I want it to)
"
" Influenced by: https://github.com/spf13/spf13-vim/blob/master/.vimrc
"
" - Sami Haahtinen <ressu@ressukka.net>
" }