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
~ smirnov$ echo "int main(){}; int sum(x, y){int result; result=x+y; return result;}" | clang -O3 -o test.o -xc - && otool -vt test.o -p _sum | |
test.o: | |
(__TEXT,__text) section | |
_sum: | |
0000000100000f90 pushq %rbp | |
0000000100000f91 movq %rsp, %rbp | |
0000000100000f94 addl %esi, %edi | |
0000000100000f96 movl %edi, %eax | |
0000000100000f98 popq %rbp | |
0000000100000f99 ret |
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 <Foundation/Foundation.h> | |
#include "openssl/bn.h" | |
#include "openssl/evp.h" | |
#include "openssl/err.h" | |
#include "openssl/pem.h" | |
#include "openssl/ssl.h" | |
// SSH key types | |
typedef enum SSHKeyType : short { |
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
[general] | |
debug: true | |
[tty] | |
dev: /dev/tty.usbmodemfa132 | |
baudrate: 9600 | |
timeout: 0.01 | |
[email] | |
enabled: true |
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
{% macro pagination(total, per_page, curr_page, sorting, order, search_id) %} | |
{% set pages_quantity = (total / per_page) | round(1, 'floor') | int %} | |
{% if pages_quantity != 0 %} | |
<div class="pages"> | |
<div class="content pagination"> | |
<div class="pagination"> | |
<ul> | |
<li {% if curr_page -1 <= 0 %}class="disabled"{% endif %}><a href="?page={{ curr_page - 1 }}&sorting={{ sorting }}&order={{ order }}{% if search_id %}&search_id={{ search_id }}{% endif %}">«</a></li> |
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
We found a way that includes 23 stations and requires 2 transfers | |
Route plan: Akademmistechko -> Zhytomyrska -> Sviatoshyn -> Nyvky -> Shuliavska -> Politekhnichnyi Instytut -> Vokzalna -> Universytet -> Teatralna -> Khreshchatyk -> Maidan Nezalezhnosti -> Ploshcha Lva Tolstoho -> Palats Sportu -> Klovska -> Pecherska -> Druzhby Narodiv -> Vydubychi -> Slavutych -> Osokorky -> Pozniaky -> Kharkivska -> Vyrlytsia -> Boryspilska | |
Consider make a transfer from Khreshchatyk to Maidan Nezalezhnosti | |
Consider make a transfer from Ploshcha Lva Tolstoho to Palats Sportu | |
We found a way that includes 21 stations and requires 1 transfers | |
Route plan: Akademmistechko -> Zhytomyrska -> Sviatoshyn -> Nyvky -> Shuliavska -> Politekhnichnyi Instytut -> Vokzalna -> Universytet -> Teatralna -> Zoloti Vorota -> Palats Sportu -> Klovska -> Pecherska -> Druzhby Narodiv -> Vydubychi -> Slavutych -> Osokorky -> Pozniaky -> Kharkivska -> Vyrlytsia -> Boryspilska | |
Consider make a transfer from Teatralna to Zoloti Vorota |
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
#!/bin/bash | |
CG_ROOT="/sys/fs/cgroup"; | |
function cg_init { | |
mkdir -p $CG_ROOT; | |
mount -t tmpfs cgroot $CG_ROOT; | |
} | |
function cg_set { |
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
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sched.h> | |
#include <errno.h> | |
#define CHILD_STACK_SIZE 1024 * 1024 * 5 // 5 MB | |
#define CHILD_TIME_LIMIT 5 |
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
#ifdef __APPLE__ | |
#include <libproc.h> | |
#endif | |
#include <sys/resource.h> | |
#include <sys/param.h> | |
#include <sys/user.h> | |
#include <sys/sysctl.h> | |
#include <unistd.h> | |
#include <stdio.h> |
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
# -*- coding: utf-8 -*- | |
""" | |
Router | |
~~~~~~~~~~~~~~ | |
Routing API requests and errors handling | |
""" | |
from flask import Flask, jsonify, request | |
from api_versions import * |
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
#!/usr/bin/env python | |
import gtk, threading, datetime, urllib2, json | |
import Image, ImageChops, ImageStat, StringIO | |
CONFIG_FILE = "config.json" | |
# config sample | |
#{ | |
# "sensivity": 10, |
NewerOlder