This file contains hidden or 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
version: "2" | |
volumes: | |
web-data: | |
mysql-data: | |
services: | |
nginx: | |
image: nginx | |
restart: always |
This file contains hidden or 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
## Response structure | |
#### Success response example | |
``` | |
{ | |
"status": "success", | |
"data": [ | |
{ | |
"entity_id": "1", | |
"entity_type_id": "4", | |
"attribute_set_id": "4", |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
alert(1) |
This file contains hidden or 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
// got to vk.im/ page | |
// copy paste this js to console and run | |
// profit | |
var lastMsgId = parseInt(geByClass('dialogs_row ')[0].className.match(/dialogs_msg(.*)/)[1]); | |
var lastMsgId = lastMsgId + 10; | |
for (var i = lastMsgId; i > lastMsgId - 100; i--) { | |
var id = i; | |
console.log('try restore message: ' + id); | |
ajax.post('al_mail.php', {act: 'a_restore', id: i, from: 'im', hash: cur.mark_hash, gid: cur.gid}); |
This file contains hidden or 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
# main DNS server for containers | |
dns: | |
image: phensley/docker-dns | |
container_name: dns | |
restart: always | |
volumes: | |
- /var/run/docker.sock:/docker.sock | |
ports: | |
- "172.17.42.1:53:53/udp" # set dns port to docker bridge IP | |
# nginx main (bulild system 80,443 ports) |
This file contains hidden or 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
web: | |
image: nginx | |
container_name: nginx_main | |
volumes: | |
- /shared/nginx/config/:/etc/nginx/conf.d/ | |
- /shared/nginx/static/:/usr/share/nginx/html/ | |
- /shared/nginx/ssl/:/etc/nginx/ssl/ | |
ports: | |
- "80:80" | |
- "443:443" |
This file contains hidden or 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
/* Sample UDP server */ | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
int main(int argc, char**argv) | |
{ | |
int sockfd,n; | |
struct sockaddr_in servaddr,cliaddr; |
This file contains hidden or 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 fsevents | |
import socket | |
TCP_IP = '127.0.0.1' | |
TCP_PORT = 5005 | |
BUFFER_SIZE = 1024 | |
MESSAGE = "Hello, World!" | |
host = 'localhost'; |
This file contains hidden or 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 fsevents | |
import socket | |
TCP_IP = '127.0.0.1' | |
TCP_PORT = 5005 | |
BUFFER_SIZE = 1024 | |
MESSAGE = "Hello, World!" | |
host = 'localhost'; |
NewerOlder