Skip to content

Instantly share code, notes, and snippets.

View KrazyIvan-'s full-sized avatar

KrazyIvan KrazyIvan-

  • behind Great Firewall
View GitHub Profile
@KrazyIvan-
KrazyIvan- / gist:563ae24cb57ac056d0054f41a6560e61
Created December 20, 2018 01:43 — forked from jhonsore/README.md
Upload an Image from camera or gallery in WebView.
//Found on: https://stackoverflow.com/questions/15725814/upload-an-image-from-camera-or-gallery-in-webview
private ValueCallback<Uri> mUploadMessage;
private Uri mCapturedImageURI = null;
private ValueCallback<Uri[]> mFilePathCallback;
private String mCameraPhotoPath;
private static final int INPUT_FILE_REQUEST_CODE = 1;
private static final int FILECHOOSER_RESULTCODE = 1;
@KrazyIvan-
KrazyIvan- / openwrt_dhcp.sh
Created November 21, 2017 02:50 — forked from ruzickap/openwrt_dhcp.sh
OpenWrt DHCP modifications
uci set dhcp.lan.start=200
uci set dhcp.lan.limit=54
uci set dhcp.@dnsmasq[0].domain=xvx.cz
uci set dhcp.@dnsmasq[0].leasefile=/etc/dnsmasq-dhcp.leases
#Send email for new connections:
echo "dhcp-script=/etc/dnsmasq-script.sh" >> /etc/dnsmasq.conf
cat > /etc/dnsmasq-script.sh << \EOF
@KrazyIvan-
KrazyIvan- / OpenWrt detect new device and send text message.md
Created November 21, 2017 02:43 — forked from jwalanta/OpenWrt detect new device and send text message.md
Detect new network devices connecting to OpenWrt and send text message
@KrazyIvan-
KrazyIvan- / 0-openwrt-auto-mount-readme.md
Created November 19, 2017 06:54 — forked from openube/0-openwrt-auto-mount-readme.md
Auto mount USB storage device by uuid on OpenWrt
  1. Install USB device support;
opkg install kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-storage e2fsprogs fdisk usbutils mount-utils block-mount kmod-fs-ext4 kmod-fs-vfat kmod-nls-utf-8 kmod-nls-cp437 kmod-nls-iso8859-1

reboot
  1. Install blkid, run opkg update && opkg install blkid;
  2. Copy block.sh to directory /lib/functions;
  3. Copy 10-mount and 20-swap to directory /etc/hotplug.d/block;
  4. That's it! run logread -f command then plug in a USB stick to test.
@KrazyIvan-
KrazyIvan- / webdav-extensions.php
Created November 19, 2017 06:51 — forked from openube/webdav-extensions.php
webdav-extensions.php PHP FCGI script to Extend NGINX WebDAV by Joan LaPorte (plus some fixes from me)
<?php
# PHP FCGI to Extend NGINX WebDAV
# Written by Jason LaPorte ([email protected])
#
# Copyright (C) 2009 Agora Games, Inc.
#
# This software is provided 'as-is', without any express or implied warranty.
# In no event will the authors be held liable for any damages arising from the
# use of this software.