- Write the iptables commands that set the default POLICY to ACCEPT on INPUT and OUTPUT chains and DROP on FORWARD chain.
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo -e "\n\tUsage: $(basename $0) <filename.mov>\n" | |
exit -1 | |
fi | |
INPUT=$1 | |
FILENAME=${INPUT%.*} |
package org.sandbox.jfx; | |
import javafx.animation.Interpolator; | |
import javafx.animation.KeyFrame; | |
import javafx.animation.KeyValue; | |
import javafx.animation.Timeline; | |
import javafx.embed.swing.JFXPanel; | |
import javafx.geometry.Pos; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Button; |
package com.github.zjor; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.TimeUnit; | |
import static com.github.zjor.Sandbox.State.GREEN; | |
import static com.github.zjor.Sandbox.State.RED; |
RIGHT = (0, 1) | |
LEFT = (0, -1) | |
UP = (-1, 0) | |
DOWN = (1, 0) | |
def rotate(d): | |
if d == RIGHT: | |
return DOWN | |
elif d == DOWN: | |
return LEFT |
package org.sandbox; | |
import lombok.AllArgsConstructor; | |
import lombok.Builder; | |
import lombok.Data; | |
import java.time.LocalDate; | |
import java.time.LocalDateTime; | |
import java.time.temporal.ChronoField; | |
import java.util.Arrays; |
#include <Arduino_LSM6DSOX.h> | |
#include <WiFiNINA.h> | |
#define TOLERANCE 0.25 | |
enum Side { | |
TOP, BOTTOM, RIGHT, LEFT, FRONT, BACK | |
}; | |
typedef struct { |
package org.example.crypto; | |
import lombok.extern.slf4j.Slf4j; | |
import org.apache.logging.log4j.core.config.Configurator; | |
import org.web3j.contracts.eip20.generated.ERC20; | |
import org.web3j.crypto.Credentials; | |
import org.web3j.crypto.WalletUtils; | |
import org.web3j.protocol.Web3j; | |
import org.web3j.protocol.core.DefaultBlockParameterName; | |
import org.web3j.protocol.core.methods.response.TransactionReceipt; |
// color_utils.h | |
#ifndef _COLOR_UTILS_ | |
#define _COLOR_UTILS_ | |
typedef struct RGB { | |
unsigned char r; | |
unsigned char g; | |
unsigned char b; | |
} rgb_t; |
#include <stdio.h> | |
#include "driver/gpio.h" | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/task.h" | |
#define GPIO_LED GPIO_NUM_13 | |
static void init_hw(void) { | |
gpio_config_t io_conf; | |
io_conf.mode = GPIO_MODE_OUTPUT; |