Create loopback.sh
in tmp
#!/bin/bash
ensure_loop(){
num="$1"
dev="/dev/loop$num"
if test -b "$dev"; then
echo "$dev is a usable loop device."
return 0
--- | |
layout: base | |
--- | |
<div class="heading"> | |
<div class="row"> | |
<div class="twelve columns"> | |
<h1>Firmware</h1> | |
</div> | |
</div> |
<?php | |
/** | |
* do the same than parse_str without max_input_vars limitation | |
* @param $string array string to parse | |
* @return array query parsed | |
**/ | |
function my_parse_str($string) { | |
if($string==='') return array(); | |
$result = array(); |
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
import sys | |
import base64 | |
key = "" | |
class AuthHandler(SimpleHTTPRequestHandler): | |
''' Main class to present webpages and authentication. ''' | |
def do_HEAD(self): |
import socket | |
from BaseHTTPServer import HTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
class MyHandler(SimpleHTTPRequestHandler): | |
def do_GET(self): | |
if self.path == '/ip': | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html') | |
self.end_headers() |
required types | |
-------------- | |
- [X] Block allocation/freeing/delegation | |
- [ ] request for block owner | |
- [ ] lease renewal (proxy) | |
- [ ] lease renewal response (proxy) | |
Allocate Block |
Create loopback.sh
in tmp
#!/bin/bash
ensure_loop(){
num="$1"
dev="/dev/loop$num"
if test -b "$dev"; then
echo "$dev is a usable loop device."
return 0
# Install necessary things | |
apt-get update | |
apt-get install --no-install-recommends kernel-package libncurses5-dev fakeroot wget bzip2 build-essential bison | |
# Get the kernel | |
cd /usr/src | |
# search latest kernel on https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/ | |
VERSION=4.18.6 | |
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-$VERSION.tar.xz | |
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-$VERSION.tar.sign |
/* | |
Retrieved from https://web.archive.org/web/20160516165158/http://lexandera.com/2009/01/adding-alert-support-to-a-webview/ | |
*/ | |
// ... | |
import android.app.AlertDialog; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
public class MainActivity extends AppCompatActivity { |
#!/bin/bash | |
GITHUB_USERNAME=rubo77 | |
if [ "$1" == "" ]; then | |
echo 'usage: gistfile-post.sh filename [gistname]' | |
exit 0 | |
fi | |
# 0. file name for the Gist |
<?php | |
/** | |
* do the same than parse_str without max_input_vars limitation: | |
* Parses $string as if it were the query string passed via a URL and sets variables in the current scope. | |
* @param $string array string to parse (not altered like in the original parse_str(), use the second parameter!) | |
* @param $result array If the second parameter is present, variables are stored in this variable as array elements | |
* @return bool true or false if $string is an empty string | |
* |