Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomaz Ursic tomazursic

View GitHub Profile
View index.html
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Unique page title - My Site</title>
<script type="module">
document.documentElement.classList.remove('no-js');
View fucommands.md

Mount NTFS filesystem

# using this on osx derivate
sudo /usr/local/bin/ntfs-3g /dev/disk2s1 /Volumes/NTFS -olocal -oallow_other

Transfer disk image file on external drive with dd progress

# at the cost of speed! 

sudo pv -tpreb .iso | sudo dd of=/dev/disk2 bs=4M

@tomazursic
tomazursic / newclient.sh
Created Feb 14, 2019
Generate OpenVPN keys
View newclient.sh
#!/bin/bash
# Current file directory path
DIR="$(cd "$(dirname "$0")" && pwd)"
cd $DIR
generate_keys () {
key_dir=keys
archive=client-$ID.zip
base_config=base-client.conf
View list_classifiers
# source : https://pypi.org/pypi?%3Aaction=list_classifiers
Development Status :: 1 - Planning
Development Status :: 2 - Pre-Alpha
Development Status :: 3 - Alpha
Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
Development Status :: 6 - Mature
Development Status :: 7 - Inactive
Environment :: Console
@tomazursic
tomazursic / micropython.rst
Last active Aug 28, 2018
Notes for building micropython
View micropython.rst

MicroPython

Build

Install dependences

View vim-build.sh
# liblua5.1-dev luajit libluajit-5.1
sudo apt-get install liblua5.1-0-dev \
libluajit-5.1-dev \
libluajit-5.1-2 \
libluajit-5.1-common
sudo apt-get install python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
View pycom_building_firmware_image.md

Pycom building a firmware image

Requirements

  • Pycom MicroPython source code
  • Xtensa gcc compiler
  • Espressif IoT Development Framework

Debian/Ubuntu

@tomazursic
tomazursic / upgrade_stretch_to_buster.sh
Last active Jul 15, 2019
Upgrade Jessie to Stretch
View upgrade_stretch_to_buster.sh
#!/bin/bash
sudo apt-get update && \
sudo apt-get upgrade && \
sudo apt-get dist-upgrade && \
dpkg -C && \
apt-mark showhold && \
sudo rpi-update && \
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list && \
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/raspi.list && \
View pi-usb-gadget.md

Raspbeerry Pi USB gadget

  1. Fresh sd card with Raspbian

  2. Enable ssh

Add empty file "ssh" to /boot partition on SD card

Add to config.txt

@tomazursic
tomazursic / arange_by_P.bat
Last active Mar 3, 2020
Arange icons on windows desktop into falus
View arange_by_P.bat
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;