Skip to content

Instantly share code, notes, and snippets.

View dominicusin's full-sized avatar
💭
I may be slow to respond.

dominicusin dominicusin

💭
I may be slow to respond.
View GitHub Profile
@p7cq
p7cq / Fedora_Root_On_ZFS.md
Last active August 2, 2023 05:04
Fedora with Root on ZFS - installation notes
@AlmuHS
AlmuHS / Debian_Hurd_Install.md
Last active January 11, 2024 04:03
Debian GNU Hurd installation in real hardware

How to install Debian GNU/Hurd in a real PC

Debian GNU/Hurd installation guide to real hardware

Requirements

  • An old PC
  • DVD-R or CD-R
  • Recommended hardware
    • Wired Network Connection
  • CPU with high clock speed
with import <nixpkgs> {};
let
platform = {
uboot = null;
endian = "big";
name = "yun";
kernelArch = "mips";
gcc = { abi = "32"; } ;
bfdEmulation = "elf32btsmip";
kernelHeadersBaseConfig = "ath79_defconfig";
A. Create Installation DVD ISO Via Dism:
1. Extract Win 10 Enterprise version of the mirror sources folder install.wim to D drive temp directory
2. In the temp directory to create WimMount folder, and execute the following command to mount the wim file
Dism /Mount-Wim /WimFile:D:\temp\install.wim /Index:1 /MountDir:D:\temp\WimMount
3. Show the current version
Dism /Image:D:\temp\WimMount /Get-CurrentEdition
4. Show current version
Dism /Image:D:\temp\WimMount /Get-TargetEditions
@dominicusin
dominicusin / nixos
Last active April 14, 2020 20:57
nixos
#!/bin/sh --verbose
nix-collect-garbage -d
nix-store --gc
nix-store --verify --check-contents --repair
nix-store --optimise
chattr -R +c /
btrfs device scan --all-devices
@dominicusin
dominicusin / ct-strings.cc
Created August 12, 2017 07:44 — forked from dangkhoasdc/ct-strings.cc
Compile-time strings and string concatenation
#include <stdexcept>
#include <utility>
class Str {
public:
template <std::size_t N>
constexpr Str(const char(&a)[N]) : p(a), s(N - 1) {}
constexpr char operator[](std::size_t n) const {
@dominicusin
dominicusin / btrfs
Last active September 25, 2017 22:30
btrfs optimisation
for filesystem in $(mount -t btrfs | awk '{print $3}' )
do
mount -o remount,clear_cache $filesystem
btrfs balance start -v -f --full-balance -dconvert=single,usage=99 -mconvert=single,usage=99 -sconvert=single,usage=99 $filesystem
btrfs filesystem defragment -v -r -czlib -f $filesystem
btrfs scrub start -BdRf $filesystem
done
@rverton
rverton / cowroot.c
Created October 21, 2016 14:06
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
@dreikanter
dreikanter / zend-tutorial-1.html
Last active April 13, 2017 20:01
Хабрапост 2007 года про Zend Framework — http://habrahabr.ru/post/31168/, http://habrahabr.ru/post/31173/
<b>Update (2014):</b> Это статья 2007 года, которая, к моему удивлению, до сих пор пользуется спросом. По этой причине я обновил её в соответствии с новыми правилами оформления постов на Хабре, и добавил подсветку синтаксиса для примеров кода. Если кому-то захочется что-то добавить или исправить, исходник текста с хабра-разметкой выложен в открытый доступ: https://gist.github.com/dreikanter/2b4ee996d7a775e707d7
<h4>Аннотация от переводчика</h4>
PHP — один из самых широко распространенных языков разработки веб-приложений и при этом один из самых спорных. Я очень часто видел негативное отношение к этой технологии, да и недостатки, провоцирующие это отношение — не для кого не являются секретом. Тем не менее, PHP активно эволюционирует и во многих отношениях постепенно становитс лучше. Одним из серьезных шагов его развития, на мой взгляд, является появление MVC-фреймворков, призванных систематизировать процесс разработки веб-приложений и приучить к порядку разработчиков, которым зачастую здорово не хватает силы
@denisshevchenko
denisshevchenko / CV.hs
Last active August 27, 2018 20:41
Моё резюме, написанное на Haskell
{-
Денис Шевченко, 2015
-}
module Main where
import Control.Monad.Writer.Lazy
import Data.Functor ((<$>))
import Data.List (dropWhileEnd)
import Data.Char (isSpace)