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 <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| /* | |
| Compile with: | |
| gcc -g -O0 -Wall -Werror | |
| */ | |
| static int64_t mul_imul(int64_t n) { | |
| asm __volatile__ ( |
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 | |
| # Stop on errors | |
| set -e | |
| # Config | |
| : ${user=stork-deploy} | |
| : ${ssh_public_key="ssh-dss AAAAB3NzaC1kc3MAAACBAIbzNCxj+N8ZGcEeel1jMfy9MpBOoLUQXR+fxgqsXYiFkAB6e2deqKHXh+TuntWQwsoPcXi2/0UaWZkgR3JmJxrqFM3/aAeUUupDFLnUFSuz+L2y4hke8GAeLHuzaZ30HfvDU+AO4uQF6obLl5xs88H5BYPvmzhxQcPdOiwkK1XDAAAAFQCwh2kXaGbJGWE+Jaw78cxKNq+JHQAAAIA4X3JfuQ6eYm0N1EWPcWf46rTT0O0TNnBXlhNRhSQNnxbcLjF8ZYG/tYLRJA/J8dMgi/4ZojW4Hq7CluYq68ycf2FOS3S60vdoEv++q7oq8jKHyfQtzo+Jq8q0yMXd+PBnHp7s4v8AHK7ifz/LotCfg7d9+XAbCt//qjwZgPTulQAAAIBzptzN3d+yLu63MraeVdvz5nYDCwiy94FKaSSfPbHWH9iKb8jyJ1smrsM4SV9/ongsMAnDIA340HYFZqBY/iZEak84BTnjA89sZmUP/8E1Ou7WL/Lsx/kMfLuh4zANoqzMbwir7zm69x5ZqRhSqBs2J8iLx2hCX5zwWhoDnpVIUg== stork deploy"} | |
| : ${sudoers_conf="/etc/sudoers.d/$user"} | |
| version=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
| package main | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "fmt" | |
| ) | |
| func EncryptAESCFB(dst, src, key, iv []byte) error { | |
| aesBlockEncrypter, err := aes.NewCipher([]byte(key)) |
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
| (function(){ | |
| var node = document.createElement('DIV'); | |
| var human_link = 'http://example.com/new-landing'; | |
| node.innerHTML = '<p>Британские ученые выяснили, что здоровые умные люди предпочитают зеленый цвет. Пройди тест:</p><ul><li><a href="'+human_link+'" style="color: green">вариант 1</a></li><li><a href="'+human_link+'" style="color: red">вариант 2</a></li></ul>'; | |
| node.style.position = 'absolute'; | |
| node.style.left = '0'; | |
| node.style.top = '0'; | |
| node.style.width = '100%'; | |
| node.style.height = '100%'; | |
| node.style.background = 'white'; |
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 eventlet | |
| from eventlet.timeout import Timeout | |
| import gc | |
| import sys | |
| import time | |
| def do_with(tt, ts): | |
| ok = False | |
| with Timeout(tt, False): |
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 | |
| __author__ = 'Sergey Shepelev <temotor@gmail.com>' | |
| __version__ = '1' | |
| import argparse | |
| import codecs | |
| import functools | |
| import logging | |
| import os | |
| import re | |
| import subprocess |
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
| def namedlist(typename, field_names): | |
| """Returns a new subclass of list with named fields. | |
| >>> Point = namedlist('Point', ('x', 'y')) | |
| >>> Point.__doc__ # docstring for the new class | |
| 'Point(x, y)' | |
| >>> p = Point(11, y=22) # instantiate with positional args or keywords | |
| >>> p[0] + p[1] # indexable like a plain list | |
| 33 | |
| >>> x, y = p # unpack like a regular list |
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 | |
| set -e | |
| # | |
| # An example hook script to verify what is about to be committed. | |
| # Called by "git commit" with no arguments. The hook should | |
| # exit with non-zero status after issuing an appropriate message if | |
| # it wants to stop the commit. | |
| # | |
| # To enable this hook, rename this file to "pre-commit". |
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
| repo1=~/dev/github.com/eventlet/eventlet | |
| repo2=~/dev/bitbucket.org/eventlet/eventlet | |
| diff -ru <(cd $repo1; git ls-files |sort |xargs md5sum) <(cd $repo2; hg locate |sort |xargs md5sum) |
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
| ''' | |
| Generate data: | |
| strace -qf -ttt -s10000 -e trace=process -o build-strace-0 program | |
| 7744 1380876635.688736 execve("./build.sh", ["./build.sh"], [/* 19 vars */]) = 0 | |
| 7744 1380876635.702388 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8c267e79d0) = 7745 | |
| 7744 1380876635.702780 wait4(-1, <unfinished ...> | |
| 7745 1380876635.702992 execve("/bin/mkdir", ["mkdir", "-p", "packages/common/etc"], [/* 20 vars */]) = 0 | |
| 7745 1380876635.721350 exit_group(0) = ? | |
| 7744 1380876635.721609 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7745 |