Skip to content

Instantly share code, notes, and snippets.

View Eugeny's full-sized avatar

Eugene Eugeny

View GitHub Profile
user nginx nginx;
worker_processes 1;
error_log /var/log/nginx/error_log info;
events {
worker_connections 1024;
use epoll;
}
1. возраст
2. получаю 1 высшее | 2+ высшее
3. холост | есть семья
4. не работаю | работаю 1/2 ставки | полный раб день
if работаю {
5. колво часов работы в день
6. зарплата
< 3M | 3M - 6M | 6M - 10M | 10M+
traceroute to backup.ajenti.org (68.71.51.101), 30 hops max, 60 byte packets
1 10.10.1.1 (10.10.1.1) 0.148 ms 0.116 ms 0.102 ms
2 10.10.1.2 (10.10.1.2) 0.354 ms 0.227 ms 0.261 ms
3 10.10.2.1 (10.10.2.1) 2.130 ms 13.168 ms 24.668 ms
4 bras10-lo1.telecom.by (93.125.5.10) 83.205 ms 86.583 ms 86.851 ms
5 c7604-bgw.telecom.by (213.184.225.17) 87.169 ms 87.455 ms 88.236 ms
6 isp.belpak.by (86.57.252.9) 179.566 ms 85.612 ms 85.870 ms
7 193.232.250.77 (193.232.250.77) 90.566 ms 90.778 ms 91.226 ms
8 213.242.112.29 (213.242.112.29) 105.048 ms 120.805 ms 120.849 ms
9 ae-10-10.ebr2.Berlin1.Level3.net (4.69.148.22) 121.363 ms 121.734 ms 121.973 ms
void *memcpy(void *dest, const void *src, int n) {
// не работает
for (volatile int i = 0; i < n; i++) {
//*(u8int*)((u32int)dest+i) = *(u8int*)((u32int)src+i);
u8int* a = (u8int*)(src+i);
u8int* b = (u8int*)(dest+i);
*b = *a;
}
// работает
void ELF_exec(u8int* data, char* pname, int argc, char** argv, FileObject* stdin, FileObject* stdout, FileObject* stderr) {
int pid = TaskManager::get()->fork();
if (pid == 0) {
AddressSpace* as = Memory::get()->getCurrentSpace();
elfHeader* hdr = (elfHeader*)data;
for (int i = 0; i < hdr->phnum; i++) {
programHeader* ph = (programHeader*)(data + hdr->phoff + i * hdr->phentsize);
if (ph->type == PT_LOAD) {
for (int j = ph->vaddr; j < ph->vaddr + ph->memSize; j += 0x1000)
server {
server_name wiki.ajenti.org;
access_log /var/log/nginx/wiki.access.log;
location / {
root /srv/wiki;
index index.html index.htm index.php;
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1;
public static Test ReadFromTxt(string fileName)
{
Test t = null;
using (Stream s = File.OpenRead(fileName))
{
using (StreamReader sr = new StreamReader(s))
{
string name = sr.ReadLine();
t = new Test(name.SubString(6));
Question q = null;
~/Work/ajenti (dev ✘)✭ ᐅ find ajenti | grep \.py$ | xargs grep ' with.*:'
ajenti/api/helpers.py: You will need to decorate handler methods with :func:`event`.
ajenti/api/confmanager.py: with open(path, 'r') as f:
ajenti/api/confmanager.py: with open(path, 'w') as f:
ajenti/plugins/health/monitor.py: with self._lock_refresh:
ajenti/plugins/health/monitor.py: with self._cond_refresh:
ajenti/plugins/health/monitor.py: with self._cond_refreshed:
ajenti/plugins/health/monitor.py: with self._lock_refresh:
ajenti/plugins/health/monitor.py: with self._cond_refreshed:
ajenti/plugins/health/monitor.py: with self._cond_refresh:
Symbol table '.symtab' contains 32 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 FILE LOCAL DEFAULT ABS syscalls.c
2: 00000000 0 SECTION LOCAL DEFAULT 1
3: 00000000 0 SECTION LOCAL DEFAULT 2
4: 00000000 0 SECTION LOCAL DEFAULT 3
5: 00000000 0 SECTION LOCAL DEFAULT 4
6: 00000000 0 SECTION LOCAL DEFAULT 6
def a(x,y): return x and y
def o(x,y): return x or y
def s(x,y): return not(x and y) // sheffer
def n(x): return not x
def c(fx):
r = 2
for x1 in [True, False]:
for x2 in [True, False]: