This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################## | |
# How to NEVER use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda constru-# | |
# ct in Python 2.x. [DO NOT USE ANY OF THIS EVER] # | |
# by: e000 (13/6/11) # | |
########################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much anonymous "one line" functions |
This allows user to do automated installation of ubuntu. Provided here a a few different files/scripts for making this easier.
I've used this to verify that d-i kernel and initramfs from -proposed work as shown in bug 1511497.
The provided 'preseed' below can be used as a fully automated installation of ubuntu. Boot with qemu like:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ANALOG_IN 0 | |
void setup() { | |
Serial.begin(9600); | |
//Serial.begin(115200); | |
} | |
void loop() { | |
int val = analogRead(ANALOG_IN); | |
Serial.write( 0xff ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#element{ | |
background-image: url('/images/sprite.png'); | |
background-repeat: no-repeat; | |
background-position: -3px 0; | |
} | |
@media (min--moz-device-pixel-ratio: 1.25), | |
(-webkit-min-device-pixel-ratio: 1.25), | |
(min-device-pixel-ratio: 1.25), | |
(min-resolution: 1.25dppx) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# D-I config version 2.0 | |
default debian/7.4/amd64/boot-screens/vesamenu.c32 | |
prompt 1 | |
timeout 300 | |
menu title - Boop Menu - | |
label Debian-7.4 | |
menu label ^0 Debian 7.4 | |
#include debian/7.4/amd64/boot-screens/menu.cfg | |
kernel debian/7.4/amd64/linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
URL="http://localhost:8000" | |
COOKIES="cookies.txt" | |
fnmatch () { case "$2" in $1) return 0 ;; *) return 1 ;; esac ; } | |
listen() { | |
# Watch Salt's events HTTP stream. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This custom installer assumes to use the Debian Wheezy 32-bit/AMD 64-bit. | |
Example of preseed file http://www.debian.org/releases/stable/example-preseed.txt. | |
- Plug the USB flash drive into a Linux based system. | |
- # sudo blkid | |
* Note the device name for the USB flash drive to be used in the next step. | |
- Use gParted or fdisk or cfdisk to create the following on the USB flash drive. | |
- Create as: Primary Partition | |
- Free space preceding (MIB): 1 | |
- Free space following (MIB): 0 |
OlderNewer