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 dht | |
import machine | |
try: | |
import usocket as socket | |
except: | |
import socket | |
import ussl as ssl | |
# a template of HTTP request to ThingSpeak to post temperature and humidity |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
char buffer[16]; | |
int main(int argc, char **argv) { | |
if(argc < 2) { | |
printf("no parameters specified\n"); | |
exit(-1); |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
// access flag | |
char access; | |
// a buffer for password | |
char buffer[16]; | |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
char buffer[16]; | |
int main(int argc, char **argv) { | |
if(argc < 2) { | |
printf("no parameters specified\n"); | |
exit(-1); |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
void do_something(void) { | |
printf("this is not a secret\n"); | |
} | |
void print_secret(void) { | |
printf("this is a secret\n"); |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
char secret[32]; | |
char public[32]; | |
void print_strings(char *buffer, int len) { | |
for (int i=0; i<len; i++) { | |
if (buffer[i] != 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
FROM ubuntu | |
RUN apt-get update | |
# we're going to run a Python application | |
RUN apt-get install -y python3.5 | |
# configure an SSH server in case we want to debug something | |
RUN apt-get install -y openssh-server | |
RUN mkdir /var/run/sshd |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.0.1.RELEASE' | |
classpath 'org.owasp:dependency-check-gradle:3.1.2' | |
} | |
} |
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
pipeline { | |
agent any | |
stages { | |
stage('Build') { | |
steps { | |
sh './gradlew build' | |
} | |
} | |
stage('OWASP Dependency Check') { |
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
# this is a dockerfile which builds picotls, and start a local TLS 1.3 server | |
# | |
# the following commands build a docker image | |
# | |
# $ docker build --file Dockerfile --tag picotls/server/tls13 . | |
# | |
# the following command starts a local picotls server | |
# | |
# $ docker run -p 20101:20101 picotls/server/tls13 | |
# |