Skip to content

Instantly share code, notes, and snippets.

View lukassup's full-sized avatar
🍕

Lukas Šupienis lukassup

🍕
View GitHub Profile
#!/bin/bash
# vim: set noet sw=4 sts=4 ts=4:
RELEASE='Fedora-Atomic-26-20170821.0'
CHKSUM='Fedora-CloudImages-26-20170821.0-x86_64-CHECKSUM'
IMAGE="$RELEASE.x86_64.qcow2"
SUBNET="88"
printf -v MAC_PREFIX '52:54:00:%02x:00' "$SUBNET"
DOMAIN="cluster"
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
" be cool
colorscheme pablo
" let &background = 'dark'
let &laststatus = 2
let &history = 256
# Use same prefix as GNU Screen
unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Reload config file
bind-key r source-file ~/.tmux.conf
# Vi-like pane navigation
bind-key h select-pane -L
#!/bin/bash
# download CloudFlare SSL binaries if needed
CFSSL='cfssl'
hash $CFSSL || {
curl -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 \
&& chmod +x cfssl \
&& CFSSL='./cfssl'

Java applets in Firefox ESR 52 32-bit on Fedora

Based on this Webex guide for Ubuntu.

Tested to work on Fedora 26

Install dependencies

sudo dnf install -y libcanberra.i686
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import json
import sys
def main():
parser = argparse.ArgumentParser(
# -*- mode: ruby -*-
# vi: set ft=ruby :
CPU = 1
MEM = 512
DOMAIN = 'cluster'
NET_BRIDGE = 'virbr0'
# NOTE: required for VBox linked_clone
Vagrant.require_version '>= 1.8', '<2.0'
#!/bin/bash
# vim: set noet sw=4 sts=4 ts=4:
RELEASE='Fedora-Atomic-25-20170705.0'
CHKSUM='Fedora-CloudImages-25-20170705.0-x86_64-CHECKSUM'
IMAGE="$RELEASE.x86_64.qcow2"
SUBNET="88"
printf -v MAC_PREFIX '52:54:00:%02x:00' "$SUBNET"
DOMAIN="cluster"

Python small object caching

The Python interpreter performs caching of some small objects.

Two small integers of the same value are also referring to the same object despite being instantiated independently.

>>> a = 1
>>> b = 1
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
R"""vilniustransport.lt public transport subscription card status viewer
Script depends on "requests" and "beautifulsoup4" Python packages, use:
$ pip install requests beautifulsoup4
to install them