Skip to content

Instantly share code, notes, and snippets.

View jnovikov's full-sized avatar
🦀

Ivan Novikov jnovikov

🦀
  • Dublin, Ireland
  • 23:21 (UTC)
View GitHub Profile
@jnovikov
jnovikov / send_flag.py
Last active April 20, 2021 14:34
Simple script to send flag to the ForcAD jury system
import socket
# Jury IP
IP = "192.168.88.252"
# Your team token
TOKEN = ""
# send one flag
def send_flag(flag):
@jnovikov
jnovikov / power.go
Created August 21, 2019 20:44
Golang standart library test example
package power
import "errors"
var NegativeError = errors.New("Negative component is not supported")
func power(base, i int) int {
if i == 0 {
return 1
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add message</title>
</head>
<body>
Here you can add new message
<form method="post" action="">
<label for="text">Message: </label>
@jnovikov
jnovikov / executor.go
Created May 12, 2019 10:23
Example of channels
package main
import (
"fmt"
"os/exec"
"strings"
"sync"
)
var wg sync.WaitGroup
@jnovikov
jnovikov / xor.go
Created May 5, 2019 10:16
Read files
package main
import (
"fmt"
"os"
"sync"
)
var m = make(map[string]int)
var wg sync.WaitGroup
@jnovikov
jnovikov / xor.go
Last active May 5, 2019 09:52
Xor Reader/Writer example
package main
import (
"fmt"
"io"
"os"
)
type XorWriter struct {
w io.Writer
@jnovikov
jnovikov / s.go
Created April 21, 2019 10:19
Interfaces and structs
package main
import (
"errors"
"io"
"os"
"strings"
"unicode"
)
@jnovikov
jnovikov / server.go
Created April 21, 2019 10:17
Golang tcp server example
package main
import (
"fmt"
"net"
)
func handleConnection(c net.Conn) {
var s string
n, _ := fmt.Fscan(c, &s)
@jnovikov
jnovikov / input_output.go
Created March 17, 2019 09:49
Input/Output examples
package main
import (
"bufio"
"fmt"
"io/ioutil"
"os"
)
func main() {
@jnovikov
jnovikov / main.cpp
Created January 13, 2019 10:21
Threads SHP example
#include <thread>
#include <iostream>
#include <fstream>
#include <cmath>
#include <vector>
#include <map>
//
//std::map<std::string, int> stats;
//
//void count_words(std::string& filename) {