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
// -*- mode: js; coding: utf-8 -*- | |
(function ($) { | |
'use strict' | |
var module = { | |
view_mode_get: function() { | |
var width = $(window).width() | |
if (width < 768) { |
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 python3 | |
# -*- mode: python; coding: utf-8 -*- | |
assert str is not bytes | |
import sys | |
import os, os.path | |
import csv | |
import itertools | |
import random |
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 python3 | |
# -*- mode: python; coding: utf-8 -*- | |
assert str is not bytes | |
import my_example_1_wsgi as _my_example_1_wsgi | |
import my_example_2_wsgi as _my_example_2_wsgi | |
import my_example_3_wsgi as _my_example_3_wsgi | |
_application_by_host_dict = { |
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
// -*- mode: c; coding: utf-8 -*- | |
// | |
// $ gcc -Wall -Werror -o to-test to-test.c && sudo ./to-test | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <strings.h> | |
#include <arpa/inet.h> | |
#include <netdb.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
local function tprint(tbl, indent, depth) | |
if indent == nil then indent = 0 end | |
if depth == nil then depth = 4 end | |
for k, v in g.pairs(tbl) do | |
local formatting = g.string.rep(' ', indent) .. g.tostring(k) .. ': ' | |
if g.type(v) == 'table' then | |
if indent < depth then | |
g.print(formatting) |
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
[Unit] | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/usr/bin/ssh -o ServerAliveInterval=60 -NfD 1080 MY_SUPER_USER_NAME@MY_SUPER_SERVER_NAME | |
Restart=on-failure | |
RestartSec=10s | |
[Install] |
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
[regular-user@localhost ~]$ sudo -i | |
[sudo] password for regular-user: | |
[root@localhost ~]# smartctl -x /dev/sdb | |
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.16.3-1-ARCH] (local build) | |
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org | |
/dev/sdb: Unknown USB bridge [0x04e8:0x61c8 (0x1301)] | |
Please specify device type with the -d option. | |
Use smartctl -h to get a usage summary |
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
Способы самоубийства | |
1. Броситься под поезд | |
Вpемя: Секунды, или, если не повезет, - часы. | |
Доступность: Везде, где есть высокоскоpостные железные доpоги. | |
Hадежность: Зависит от Вашей сноpовки и скоpости поезда. Решайтесь на декапитацию. | |
Пpимечания: Веpоятно, наилучшим способом является положить шею на pельсы, тогда колесо поезда пеpебьет Вам позвоночник (и искалечит Вас). Скоpостные поезда пpи тоpможении пpоходят еще около километpа, поэтому найдите кpутой повоpот. | |
2. Самосожжение | |
Вpемя: От секунд до дней. |
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
// -*- mode: js; coding: utf-8 -*- | |
// | |
// ``local_proxy`` it is -- ssh -o ServerAliveInterval=60 -NfD 1080 [email protected] | |
// | |
// ``tor_proxy`` it is -- tor proxy | |
function FindProxyForURL (url, host) { | |
var local_proxy = 'SOCKS5 127.0.0.1:1080' | |
var tor_proxy = 'SOCKS5 127.0.0.1:9050' | |
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
assert str is not bytes | |
def js_unicode_escape(unicode_str): | |
assert isinstance(unicode_str, str) | |
return ''.join(('\\u{:04x}'.format(ord(char)) for char in unicode_str)) | |
print(js_unicode_escape('фигня')) |