Skip to content

Instantly share code, notes, and snippets.

import java.util.stream.IntStream;
import java.util.stream.Stream;
import javafx.application.Application;
import javafx.beans.Observable;
import javafx.beans.binding.Bindings;
import javafx.beans.binding.BooleanBinding;
import javafx.scene.Scene;
import javafx.scene.control.CheckBox;
import javafx.scene.layout.VBox;
var checkbox = document.getElementById("checkbox");
var pwd = document.getElementById('password');
var setPasswordField = function (element) {
if (element.checked == true) {
if (pwd.getAttribute("type") == "password") {
pwd.setAttribute("type", "text");
}
} else {
pwd.setAttribute("type", "password");
}
FROM debian:jessie
RUN apt-get update
RUN apt-get install -y curl \
mcrypt \
&& apt-get install -y php5 \
php5-fpm \
php5-cli \
php-pear \
php5-common \
php5-igbinary \
@robotzero
robotzero / streamsCookbook.java
Created February 21, 2017 20:29
Java 8 Streams Cookbook
import java.time.Duration;
import java.util.*;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.*;
public class Winner {

gdisk /dev/sda

sda1 = /boot, sda2 = SWAP, sda3 = encrypted root

for the SWAP partition below, try and make it a bit bigger than your RAM, for hybernating

o ,

n , [enter] , [enter], +512M , EF00 ,

n , [enter] , [enter], +8G, 8200,

n , [enter] , [enter], [enter] , [enter] ,

w

syu: aliased to curl -s https://www.archlinux.org/feeds/news/ | xmllint --xpath //item/title\ \|\ //item/pubDate /dev/stdin | sed -r -e "s:<title>([^<]*?)</title><pubDate>([^<]*?)</pubDate>:\2\t\1\n:g" && yay -Syu
@robotzero
robotzero / btrfs.sh
Created October 17, 2018 20:31
btrfs snapshot
#!/bin/bash
# This script is designed to create a snapshot of the Root BTRFS Subvolume.
# I run it on every boot to ensure the system can be reverted due to System updates or other problems.
#
# 1. Create the /System/Snapshot directory (Or use your own schema).
# This is where we will mount the BTRFS Volume
#
# mkdir -p /System/Snapshot
#
#!/bin/bash
##########
# contents
##########
# contents
# notes
# script setup
# git config files
For system maintenance:
List unmerged .pacnew files after every update:
[Trigger]
Operation = Upgrade
`cryptsetup open /dev/xxx linuxroot`
`sudo mount -o ssd,noatime,space_cache=v2,autodefrag,compress=zstd:3,nodiscard,nodev,nosuid,subvol=@home /dev/mapper/linuxroot /mnt/install/home
`sudo mount -o ssd,noatime,space_cache=v2,autodefrag,compress=no,nodiscard,subvol=@snapshots /dev/mapper/linuxroot /mnt/install/.snapshots
`sudo mount -o ssd,noatime,space_cache=v2,autodefrag,compress=zstd:3,nodiscard,subvol=@srv /dev/mapper/linuxroot /mnt/install/srv`
`sudo mount -o ssd,noatime,space_cache=v2,autodefrag,compress=zstd:3,nodiscard,nodatacow,noexec,subvol=@var_log /dev/mapper/linuxroot /mnt/install/var/log`
`sudo mount -o ssd,noatime,space_cache=v2,autodefrag,compress=zstd:3,nodiscard,nodatacow,nodev,nosuid,noexec,subvol=@var_cache /dev/mapper/linuxroot /mnt/install/var/cache`
`sudo mount -o ssd,noatime,space_cache=v2,autodefrag,compress=no,nodiscard,nodatacow,nodev,nosuid,noexec,subvol=@var_lib_docker /dev/mapper/linuxroot /mnt/install/var/lib/docker`
`sudo mount -o ssd,noatime,space_cache=v2,autodefrag,co