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
{ | |
"code": null, | |
"site": { | |
"id": "hh", | |
"name": "hh.ru" | |
}, | |
"published_at": "2015-08-18T18:19:28+0300", | |
"accept_handicapped": false, | |
"key_skills": [], | |
"employment": { |
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 threading | |
import time | |
class Ti(threading.Thread): | |
def __init__(self): | |
print('inittt') | |
self.k = 1 | |
self.t = None | |
super().__init__() |
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
#FUNCTION x509_get_info(pem character varying) | |
# old | |
from gnutls.crypto import X509Certificate | |
x=X509Certificate(pem.replace('\r ', '\r\n')) | |
subj = dict([f.split('=') for f in x.subject.split(',')]) | |
from datetime import datetime | |
return subj['CN'], datetime.fromtimestamp(x.expiration_time) | |
#new |
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
#!/usr/bin/env bash | |
# select "name" from animals_vpnaccount where id in (select vpnaccount from animals_homertunnel where isptunnel in (select id from animals_isptunnel where account in (select id from animals_ispaccount where isp in (select id from animals_isp where name = 'NetByNet')))) order by name; | |
while read p | |
do | |
echo $p | |
# проверка | |
curl -w "size: %{size_download}\n\n" -o /dev/null -m 10 -L -x 'botanik.yandex.net:4050' -H "Forward-Via: $p" --silent 'http://static.yandex.net/ok.html' -vv 2>&1 | grep -iE "GET.*HTTP/|Host:|size:" |
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 | |
DSTDIR=$1 | |
WPLATESTGZ=$(mktemp) | |
wget -O $WPLATESTGZ http://wordpress.org/latest.tar.gz | |
#cp -v latest.tar.gz $WPLATESTGZ | |
WPLATESTDIR=$(mktemp -d) |
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
# coding=utf-8 | |
import re | |
# simple css parser | |
SELECTOR = '^\s*([#-_\.a-z\s:\(\)]+?)\s*({)' | |
PROPERTIES = '^\s*([-a-z]*?\s*:?\s*.*?)\s*(})' | |
SELECTOR_SEPARATOR = ',' | |
PROPERTIES_SEPARATOR = ';' |
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
var a = 10; | |
loop = setInterval( fadeout, 100 ); | |
function fadeout() { | |
if( a > 0 ) { | |
a -= 2; | |
alert(a/10) | |
} else { | |
clearInterval( loop ); | |
} | |
} |
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
# -*- coding: utf-8 -*- | |
# ha-ha! | |
import itertools | |
DICTIONARY = 'abc123' | |
LIMIT = 3 | |
out_file = 'out.log' | |
with open(out_file, 'w') as file: | |
for i in itertools.product(DICTIONARY, repeat=LIMIT): |
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
window_x = 320 | |
window_y = 240 | |
'GraphicsWindow.BackgroundColor = "Black" | |
GraphicsWindow.Title = "Plasma" | |
GraphicsWindow.Width = window_x | |
GraphicsWindow.Height = window_y | |
GraphicsWindow.Show() | |
t = Math.GetRandomNumber(1000) * 1.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 <Windows.h> | |
int main(){ | |
HKEY hKey; | |
if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Run"), 0, KEY_WRITE, &hKey) == ERROR_SUCCESS) | |
{ | |
TCHAR str[] = TEXT("D:\\putty.exe"); | |
RegSetValueEx(hKey, TEXT("Putty"), 0, REG_SZ, (LPBYTE)&str, sizeof(str)); | |
RegCloseKey(hKey); |
OlderNewer