Skip to content

Instantly share code, notes, and snippets.

@Tookmund
Tookmund / Debootstrap Install.rst
Last active April 5, 2024 20:20
Install Debian or Ubuntu like Arch

This guide is a best-effort to configure a system with just debootstrap.

It has been updated so as not to be actively incorrect as of June 2022, when I realized it was still being used, but it was first written in 2015 and I can't guarantee that it's not missing essential parts of the process.

If it breaks, you get to keep both pieces

  1. Download a Debian live standard CD: https://cdimage.debian.org/cdimage/release/current-live/amd64/bt-hybrid/
  2. Login with user:live (if needed, it will probably automatically login)
  3. Check that you have internet with ip a. If you're using ethernet it should already be connected, otherwise you'll need to configure interfaces(5) and probably wpa_supplicant(8)
@chrisgilbert
chrisgilbert / gist:58f57c82f74162ed5c0f
Last active June 25, 2021 19:17
Run Ansible or Ansible-Playbook from Rundeck
#!/bin/bash
# Interpret whether the input needs to go to ansible, or ansible-playbook and run appropriately
# First update the git repos for each project
/usr/bin/update-git-repos
export ANSIBLE_FORCE_COLOR=1
export ANSIBLE_RETRY_FILES_ENABLED=False
@hillar
hillar / molo2midi.js
Last active May 13, 2016 08:21
moloch sessions to midi
// ES6
/*
moloch sessions.csv field names
[ 'Protocol',
' First Packet',
' Last Packet',
' Source IP',
@eyecatchup
eyecatchup / secure_flashing_mako_lrx21t
Created November 22, 2014 13:06
The safest way to flash factory images - This is a manual step-by-step procedure to flash Android 5.0 (LRX21T) factory images onto the Nexus 4 (aka mako).
# Create a new working directory and cd into it
~$ mkdir -p /path/n4update && cd /path/n4update
# Download all files you need
/path/n4update$ wget --no-check-certificates https://dl.google.com/dl/android/aosp/occam-lrx21t-factory-51cee750.tgz
# Download openrecovery-twrp-2.8.2.0-mako.img from http://techerrata.com/browse/twrp2/mako to the same path
# Download CF-Auto-Root-mako-occam-nexus4.zip from http://autoroot.chainfire.eu to the same path
# Extract downloaded file archives
/path/n4update$ mkdir -p ./images && tar zxvf occam-lrx21t-factory-51cee750.tgz -C ./images
anonymous
anonymous / setup_kiosk.sh
Created November 6, 2014 17:17
create a kiosk user
#!/bin/bash
# This script
# - creates a user (named below)
# - sets up a union (aufs) filesystem on top of the users immutable home
# - creates a cleanup script (/usr/local/bin/cleanup.sh) that empties the aufs
# layer on login/logout/boot
# - replaces the lightdm config
# - replaces rc.local to run the script
#
@cdown
cdown / gist:5c5b53e1855d7812dfbc
Last active February 27, 2024 19:01
Debian chroot inside Arch
pacman -S wget # needed for debootstrap
curl -o /tmp/db.deb http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.60~bpo70+1_all.deb
mkdir /opt/debootstrap
cd /opt/debootstrap
ar x /tmp/db.deb
tar xf data.tar.gz
mkdir /opt/debian
@wkettler
wkettler / dd.py
Last active July 21, 2023 08:01
A Python wrapper for the GNU dd command.
from execute import execute, Retcode
def dd(ifile, ofile, bs, count=None, seek=None):
"""
Wrapper for the GNU dd command.
Inputs:
ifile (str): Input file
ofile (str): Output file
bs (str): Block size
@tzbob
tzbob / uhosts.scala
Created November 7, 2013 23:20
automatically update pdnsd.adblock
#!/usr/bin/env scala
import scala.io.Source
import java.io.FileWriter
import java.util.Calendar
import scala.util.matching.Regex
val resources = List(
Resource("http://someonewhocares.org/hosts/hosts"),
Resource(
@MarcDiethelm
MarcDiethelm / Contributing.md
Last active April 1, 2024 13:55
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@tr3buchet
tr3buchet / debootstrap.md
Last active July 5, 2023 11:26
debian usb debootstrap

make sure any needed utilities are installed

sudo aptitude install debootstrap coreutils util-linux e2fsprogs

get usb device

df -h