Skip to content

Instantly share code, notes, and snippets.

View wdog's full-sized avatar
🎯
Focusing

wdog wdog

🎯
Focusing
View GitHub Profile
@wdog
wdog / .conkyrc
Created March 15, 2017 16:55
Conky bottom bar
wn_window yes
own_window_colour 262729
own_window_transparent yes
own_window_type panel
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
use_spacer right
use_xft yes
xftfont mono:size=9
xftalpha 1
@wdog
wdog / sorting_control.php
Created April 5, 2017 09:43
Alternative Nayjest/Grid sorting_control.php
<small style="white-space: nowrap">
<?php if (!$column->isSortedAsc() && !$column->isSortedDesc()): ?>
<a
class="text-success"
title="Sort ascending"
href="<?= $grid->getSorter()->link($column, 'ASC') ?>"
>
<span class="glyphicon glyphicon-sort" aria-hidden="true"></span>
</a>
<?php elseif ($column->isSortedAsc()): ?>
@wdog
wdog / total.php
Last active April 10, 2017 07:17
Nayjest Sum Total
(new TotalsRow(['posts_count', 'comments_count']))
->setFieldOperations([
'posts_count' => TotalsRow::OPERATION_SUM,
'comments_count' => TotalsRow::OPERATION_SUM,
]),
(new THead)
->setComponents([
(new FiltersRow)
->addComponents([
(new Filter((new FilterConfig())->setOperator(FilterConfig::OPERATOR_EQ)))
->setName('d_doc')
->setTemplate('*.components.filters.datetime_picker')
->setRenderSection('filters_row_column_d_doc')
@wdog
wdog / bash_prompt.sh
Created September 13, 2017 14:20
wdog bash prompt
#!/bin/sh
function fy(){
echo $(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')
}
function fx(){
echo $(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g')
}
@wdog
wdog / iban.php
Created March 16, 2018 13:07
IBAN TO PARTS - ITALY
<?php
function iban_get_parts( $iban )
{
return [
'country' => substr( $iban, 0, 2 ),
'checksum' => substr( $iban, 2, 2 ),
'checksum_national' => substr( $iban, 4, 1 ),
'abi' => substr( $iban, 5, 5 ),
'cab' => substr( $iban, 10, 5 ),
@wdog
wdog / i3block_spotify
Created October 9, 2018 09:34
i3block for spotify
#!/usr/bin/python3
import dbus
import os
import sys
STATUS_TO_ICON = {
'Playing': '',
'Paused': '',
'Stopped': '',
@wdog
wdog / arduino_waper_pump
Created October 20, 2018 12:28
arduino nano moist sensor temperature humidity waper pump
#include <Wire.h>
#include <LiquidCrystal_PCF8574.h>
#include "DHT.h"
#define DHTPIN 11
#define DHTTYPE DHT11 // DHT 11
DHT dht(DHTPIN, DHTTYPE);
#define MOISTPIN 6
int sensorvalue = 0;
@wdog
wdog / sensors.ino
Created March 8, 2019 22:28
LCD 1602 w/ BMP280 + MQ7 + RTC
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC;
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>

Installing Debian on btrfs subvolume

Install debian as usual:

  • EFI partition ~256M, boot, esp flags
  • ext2 boot partition ~512M
  • luks cyrpt volume
    • LVM pv
      • swap ~5G
      • btrfs

When the installation is finished, boot into SystemRescueCD.