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
#!/bin/bash | |
echo -n 'EMail: ' | |
read MAIL | |
echo -n 'Password: ' | |
stty -echo | |
read PASS | |
stty echo | |
curl -c cookie "vk.com/login.php?email=$MAIL&pass=$PASS" | |
USER_ID=$(curl -b cookie 'vk.com/feed' | grep -oE 'events_queue([0-9]+)' | sed 's/events_queue//') |
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 <stdio.h> | |
#include <string.h> | |
#ifdef _WIN32 | |
#include <Windows.h> | |
#else | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> |
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 ctypes import c_int, create_string_buffer, CDLL, CFUNCTYPE | |
import os, ctypes | |
PROT_NONE = 0x0 | |
PROT_READ = 0x1 | |
PROT_WRITE = 0x2 | |
PROT_EXEC = 0x4 | |
MAP_PRIVATE = 0x02 | |
MAP_ANONYMOUS = 0x20 |
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 sys | |
def diff(a, b): | |
al = a.split('\n') | |
bl = b.split('\n') | |
ah = [hash(s) for s in al] | |
bh = [hash(s) for s in bl] | |
t = [[0 for j in range(0, len(bl)+1)] for i in range(0, len(al)+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 <unistd.h> | |
#include <stdio.h> | |
int main() | |
{ | |
if (isatty(fileno(stdout))) | |
printf("\e[1mIn terminal\e[0m\n"); | |
else | |
printf("In file or pipe\n"); | |
return 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 PIL import Image, ImageDraw | |
import sys | |
infile = sys.argv[1] | |
f = file(infile) | |
w, h = map(int, f.readline().split()[2::3]) | |
lines = f.readlines() | |
x = lines[0][0] | |
im = Image.new('RGB', (w, h), (0, 0, 0)) | |
draw = ImageDraw.Draw(im) |
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
set nu | |
set autoindent | |
set expandtab | |
set smartindent | |
set ts=4 | |
set sw=4 | |
set softtabstop=4 | |
if has("gui_running") | |
set guioptions-=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 <iostream> | |
#include <cstring> | |
#include <map> | |
#include <vector> | |
#include <iomanip> | |
#include <string> | |
using namespace std; | |
/* | |
ifstream cin("in"); |
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 <cstdlib> | |
using namespace std; | |
struct node | |
{ | |
int top, par, val, sz; | |
node(int p = 0, int t = 0, int s = 0, int v = 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
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#define READ_END 0 | |
#define WRITE_END 1 | |
char buf[256]; | |
char text[] = "hello!!\n"; |
OlderNewer