Enlaces con otros ficheros compartidos en los comentarios:
// | |
// This sketch will print some of interesting predefined constants to Serial. | |
// | |
// For more information, look at | |
// http://electronics4dogs.blogspot.com/2011/01/arduino-predefined-constants.html | |
// helper macro | |
#define LINE(name,val) Serial.print(name); Serial.print("\t"); Serial.println(val); | |
void setup() |
#!/usr/bin/env python | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |
Raw CSV data is made available by Common Data Hub here:
http://www.commondatahub.com/live/geography/state_province_region/iso_3166_2_state_codes
http://www.commondatahub.com/live/geography/country/iso_3166_country_codes
The table cdh_state_codes
(see cdh-schema.sql
below) is designed to hold the raw data, which should import readily using most common database tools, or directly into MySQL via LOAD DATA, e.g.:
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE iso3166
.cdh_state_codes
;
#!/bin/bash | |
# | |
# Run this script once per day | |
# | |
DOMAIN="ZHOVNER.COM" | |
if [ ! -f /tmp/$DOMAIN.old.whois.txt ]; then |
<?php | |
define( 'httpBL_KEY', '[YOUR API KEY HERE]' ); | |
class httpBL { | |
private static $_visitor_type = array( | |
0 => 'Search Engine Bot', | |
1 => 'Suspicious', | |
2 => 'Harvester', |
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
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 |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
#!/bin/bash | |
echo Backing up your sources.list... | |
cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
echo Adding the sid repo to sources.list... | |
echo deb http://ftp.us.debian.org/debian/ sid main >> /etc/apt/sources.list | |
echo Updating the sid packages list... | |
apt-get update |