Skip to content

Instantly share code, notes, and snippets.

@naodesu
naodesu / updateip.vbs
Last active August 29, 2015 14:12 — forked from anonymous/updateip.vbs
Update dynamic IP using freedns.afraid.org service (script for Windows)
myURL = "http://freedns.afraid.org/dynamic/update.php?"
Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
objHTTP.Open "GET", myURL, False
objHTTP.Send
@naodesu
naodesu / gist:10620506
Created April 14, 2014 06:11
How to mount ubifs image in Linux.
# $UBIFS is ubifs image file
# make sure $IMAGE is a ubifs image file
blkid $(IMAGE)
$(IMAGE): ... TYPE="ubifs"
# size of created mtd is 256.0 MiB
modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95
flash_erase /dev/mtd0 0 0
ubiformat /dev/mtd0 -s 2048 -O 2048
modprobe ubi
@naodesu
naodesu / update-antizapret
Last active December 20, 2016 12:25
Скрипт для получения списков запрещённых URL через API сайта antizapret.info и генерации серверного конфига для openvpn.
#!/bin/sh
CONF=/etc/openvpn/home/client-config/DEFAULT
IP_URL=http://api.antizapret.info/group.php
trap cleanup EXIT
cleanup() {
rm $NEW_CONF 2>/dev/null
}
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
COMMIT="2b68ccd"
BUKKIT_API="1.3.2-R0.1"
JAVA_PKG_IUSE="doc source"
inherit games java-pkg-2 java-pkg-simple
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
COMMIT="0733804"
MC_PV="1.3.2"
MC_PN="minecraft-server-unobfuscated"
MC_JAR="${MC_PN}-${MC_PV}.jar"