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
; Simple example | |
; Writes Hello World to the output | |
JMP start | |
digits: DB 0 ; Variable | |
DB 0 | |
DB 0 | |
output_p: DB 232 | |
start: |
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 <iostream> | |
#include <cstdio> | |
int main() { | |
FILE *p = popen("ls -p | grep -v /", "r"); | |
char *t = new char[1000]; | |
int status = fscanf(p, "%s", t); | |
while (status != -1) { | |
std::cout << t << std::endl; | |
status = fscanf(p, "%s", t); |
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 <cstdio> | |
//#include <iostream> | |
//#include <unistd.h> | |
//#include <fcntl.h> | |
//#include <sys/types.h> | |
//#include <sys/socket.h> | |
//#include <arpa/inet.h> | |
//#include <csignal> | |
// | |
// |
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 <iostream> | |
#include <string> | |
#include <vector> | |
int mod(int a, int b) { | |
return (a % b + b) % b; | |
} | |
std::string decrypt(std::string &s, int key) { |
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 <cstdio> | |
#include <iostream> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
int main() { |
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 random | |
import sys | |
import pygame | |
size = width, height = 800, 600 | |
white = 255, 255, 255 | |
class Ball(object): |
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 <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <string> | |
#include <climits> | |
#include <unordered_map> | |
#include <cstdlib> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <fstream> |
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 sqlite3 | |
conn = sqlite3.connect("db.db") | |
cursor = conn.cursor() | |
init_db = "CREATE TABLE IF NOT EXISTS users " \ | |
"(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " \ | |
"login VARCHAR(200) UNIQUE, password VARCHAR(200))" |
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 requests | |
base_url = "https://shadowservants.ru" | |
url = "/" | |
def register(login,password): | |
data = dict(login=login,password=password) | |
r = requests.post(base_url + "/register",data=data) | |
print(r.status_code,r.text) |
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 sqlite3 | |
conn = sqlite3.connect("test.db") | |
cursor = conn.cursor() | |
create_db = 'CREATE TABLE IF NOT EXISTS users (id INTEGER NOT NULL ' \ | |
'PRIMARY KEY AUTOINCREMENT, login VARCHAR(200), password VARCHAR(200),' \ | |
'favourite_team VARCHAR(300), favourite_number INTEGER )' |