Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
robinsmidsrod / freedos-installer.pxe
Created June 29, 2011 12:06
FreeDOS 1.0 fdfullcd.iso installer booting directly from HTTP with hooked iSCSI drive
#!ipxe
echo
echo Booting FreeDOS installer for ${hostname} from SAN
set root-path iscsi:nas.smidsrod.lan::::iqn.2011-02.lan.smidsrod:${hostname}.boot.freedos
sanhook ${root-path} || goto failed
sanboot -d 0x81 http://boot.smidsrod.lan/freedos-1.0/fdfullcd.iso || goto failed
:failed
echo Boot from ${root-path} failed, dropping to shell
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active July 26, 2024 01:29
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@wjn
wjn / device-info.service
Created August 29, 2012 01:26
/ffp/etc/avahi/services/device-info.service
<?xml version="1.0" standalone="no"?><!--*-nxml-*-->
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=RackMac</txt-record>
</service>
</service-group>
@clarencesong
clarencesong / os-x-enable-trim.md
Last active September 28, 2023 17:03
Enable TRIM in OS X 10.7.5 to 10.9.5

Enable TRIM on non-Apple SSDs in OS X

NOTE: This is tested on the versions mentioned in the title, and NOT earlier or later versions. YMMV.

Run the following commands in Terminal…

Backup the original driver:

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage-backup
@kenners
kenners / flight.py
Last active May 15, 2020 20:10
Use Flightradar24.com's internal API to get flight path and output it as KML.
#!/usr/bin/env python3
import simplekml
import urllib.request
try:
import simplejson as json
except ImportError:
import json
fr24_flight_code = ""
@alghanmi
alghanmi / wps_openwrt.sh
Last active January 28, 2021 00:47
WPS on OpenWRT -- Enabling Wi-Fi Protected Setup on OpenWRT
##
## WPS on OpenWRT
## This script enables Wi-Fi Protected Setup on OpenWRT.
##
## Resources
## http://wiki.openwrt.org/doc/uci/wireless#wps.options
##
#Install the full wpad package
opkg update
@yeokm1
yeokm1 / Read-only FS on Arch Linux ARM.md
Last active July 17, 2024 01:31
Set up Arch Linux ARM on Raspberry Pi to boot from and use a read-only file-system

Read-only FS on Arch Linux ARM

Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.

Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.

Login with default username: alarm, password: alarm

#Optionally enable root over SSH. The rest of these instructions assume u are in root.
@addyosmani
addyosmani / README.md
Last active July 24, 2024 10:54 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@Axel-Erfurt
Axel-Erfurt / YouTubeDL.py
Last active January 17, 2023 07:32
GUI for youtube-dl (PyQt5)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#############################################################################
from PyQt5.QtCore import (QFile, QPoint, QRect, QSize, QStandardPaths,
Qt, QProcess, QSettings)
from PyQt5.QtGui import QIcon, QFont, QClipboard
from PyQt5.QtWidgets import (QAction, QApplication, QFileDialog, QMainWindow, QLineEdit, QProgressBar,
QMessageBox, QHBoxLayout, QVBoxLayout, QWidget, QLabel, QMessageBox, QToolButton, QComboBox)
quote = str(chr(34))