Skip to content

Instantly share code, notes, and snippets.

@radium226
radium226 / pxe.sh
Last active April 3, 2016 18:27
PXE Boot
#!/bin/bash
cat <<EOCAT >"/var/lib/pxe/dnsmasq.conf"
interface=enp0s20u2
dhcp-range=enp0s20u2,192.168.1.2,192.168.1.10,12h
dhcp-option=1,255.255.255.0
dhcp-option=3,192.168.1.1
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/var/lib/pxe/tftp
#!/bin/bash
declare hostapd_pid=
declare dnsmasq_pid=
declare network_device="${1:-wlp2s0}"
cat <<EOCAT >"$( pwd )/hostapd.conf"
interface=${network_device}
driver=nl80211
object TryMagnetPattern {
sealed trait TextMagnet {
val text: String
def apply(f: String => String): String = f(text)
}
object TryViewBound {
case class Person(val firstName: String, val lastName: String)
trait HasIdentity {
def identity(): String
}
object TryContextBound {
case class Ball(radius: Double, color: String)
case class Cube(height: Double, width: Double, depth: Double)
trait HasVolume[A] {
def volume(a: A): Double
object TryCustomStringInterpolation {
class TextFunction(val function: String => String) extends Function[String, String] {
def apply(text: String): String = function.apply(text)
}
implicit class SQLStringContext(val stringContext: StringContext) extends AnyVal {
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.github.radium226.gists;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
package radium.gist;
import java.lang.reflect.Method;
import org.objenesis.ObjenesisHelper;
import javassist.util.proxy.MethodHandler;
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.ProxyObject;
DECLARE
C_RANDOM CONSTANT NUMBER := 7;
v_refcursor SYS_REFCURSOR;
v_column_1 NUMBER;
v_column_2 NUMBER;
v_column_count NUMBER;
v_table_description dbms_sql.desc_tab;