This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 1dfbeab6f4ca7287e27c31a9f90ddec3343a18d5 Mon Sep 17 00:00:00 2001 | |
From: NeoCat <neocat@neocat.jp> | |
Date: Thu, 13 Oct 2016 22:19:22 +0900 | |
Subject: [PATCH] Adds NAPT and port mapping functionality to esp8266 lwip | |
esp8266 can handle 2 network interfaces (Wifi client and softAP) | |
simultaneously in the WIFI_AP_STA mode. | |
Currently IP_FORWARD is implemented in lwip to forward packets | |
between 2 interfaces, but static routing must be setup manually. | |
This patch adds IP_NAPT config option to enable esp8266 to use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
double a, b, c; | |
void test(int sig) | |
{ | |
printf("%f\n", a * b + c); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bluetoothctl | |
[bluetooth]# scan on | |
Discovery started | |
[NEW] Device 00:BA:55:XX:XX;XX UM24C | |
[CHG] Device 00:BA:55:XX:XX;XX RSSI: -63 | |
[bluetooth]# pair 00:BA:55:XX:XX;XX | |
Attempting to pair with 00:BA:55:XX:XX;XX | |
[CHG] Device 00:BA:55:XX:XX;XX Connected: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Power</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script> | |
<script src="https://code.highcharts.com/highcharts.js"></script> | |
<script src="https://code.highcharts.com/highcharts-more.js"></script> | |
<script src="https://code.highcharts.com/modules/exporting.js"></script> | |
<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# For example: switch-tty.sh `pidof vi` `tty` | |
target=$1 | |
dest=$2 | |
if [ -z "$target" -o -z "$dest" ]; then | |
echo "usage: $0 pid target" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_GFX.h> // Core graphics library | |
#include <RGBmatrixPanel.h> // Hardware-specific library | |
#include <Fonts/Arial4pt7b.h> | |
#include <Fonts/Arial7pt7b.h> | |
#define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega) | |
#define LAT A3 | |
#define OE 9 | |
#define A A0 | |
#define B A1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int input_pin = 9; | |
void setup() { | |
Serial.begin(115200); | |
Serial.println("START"); | |
pinMode(input_pin, INPUT); | |
} | |
int count = 0; | |
int last = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import datetime | |
import subprocess | |
import re | |
import time | |
from keyhac import * | |
class NICOLA: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'timeout' | |
THRESH = 80 # % | |
SPEED = 60 # sec / % | |
$IDEVICEINFO_CMD = '/usr/local/bin/ideviceinfo' | |
$POWER_ON_CMD = 'curl -s -m 5 192.168.x.x/on' | |
$POWER_OFF_CMD = 'curl -s -m 5 192.168.x.x/off' | |
$state = nil | |
$caffe_pid = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
type=ipv4 | |
function usage() { | |
echo "usage: $(basename "$0") [OPTIONS] domain" | |
echo " -6 get ipv6 address (default: ipv4)" | |
echo " -h show this help" | |
echo " -n show interface name" | |
echo " -p show prefix" | |
echo " -i interface specify interface (default: all)" |