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 | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
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
sakal@sakal:~$ xrandr -q | |
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 8192 x 8192 | |
VGA-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm | |
1920x1080 60.0*+ 59.9 | |
1920x1200 60.0 | |
1680x1050 60.0 59.9 | |
1600x1200 60.0 | |
1440x900 59.9 | |
1400x1050 60.0 | |
1360x768 60.0 59.8 |
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
> $ python3.6 [±claymore-115 ✓▴] | |
Python 3.6.5rc1 (default, Mar 14 2018, 06:54:23) | |
[GCC 7.3.0] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import timeit | |
>>> def d1(a, b): | |
... return a + '_' + b | |
... | |
>>> def d2(a, b): | |
... return '%s_%s' % (a, b) |
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
# https://www.playframework.com/documentation/2.5.x/CertificateGeneration | |
# https://jamielinux.com/docs/openssl-certificate-authority/create-the-intermediate-pair.html | |
# https://docs.docker.com/engine/security/certificates/ | |
# http://pki-tutorial.readthedocs.io/en/latest/simple/root-ca.conf.html | |
# https://support.ssl.com/Knowledgebase/Article/View/19/0/der-vs-crt-vs-cer-vs-pem-certificates-and-how-to-convert-them | |
X.509 Certificates | |
Public key certificates are a solution to the problem of identity. Encryption alone is enough to set up a secure connection, but there’s no guarantee that you are talking to the server that you think you are talking to. Without some means to verify the identity of a remote server, an attacker could still present itself as the remote server and then forward the secure connection onto the remote server. Public key certificates solve this problem. |
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
Vladimir Grishin, [24.07.16 11:26] aka @Vogre at t.me/react_js | |
но вообще в целом | |
//actioncreator | |
const fetchData(pageNum) = dispatch=> | |
fetch('mydata', {pageNum}).then(data=>dispatch({type: 'DATA_RECEIVED', payload: {data, pageNum}})) | |
//reducer | |
switch(action.type){ | |
case 'DATA_RECEIVED': |
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
name of display: :0 | |
display: :0 screen: 0 | |
direct rendering: Yes | |
server glx vendor string: SGI | |
server glx version string: 1.4 | |
server glx extensions: | |
GLX_ARB_create_context, GLX_ARB_create_context_profile, | |
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, | |
GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, | |
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, |
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
[ 7.647] | |
X.Org X Server 1.18.1 | |
Release Date: 2016-02-08 | |
[ 7.647] X Protocol Version 11, Revision 0 | |
[ 7.647] Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian | |
[ 7.647] Current Operating System: Linux sakalz 4.4.0-1-amd64 #1 SMP Debian 4.4.2-3 (2016-02-21) x86_64 | |
[ 7.647] Kernel command line: BOOT_IMAGE=/vmlinuz-4.4.0-1-amd64 root=/dev/mapper/sakalz--vg-root ro quiet cgroup_enable=memory swapaccount=1 radeon.dpm=1 | |
[ 7.647] Build Date: 09 February 2016 11:06:03AM | |
[ 7.647] xorg-server 2:1.18.1-1 (http://www.debian.org/support) | |
[ 7.647] Current version of pixman: 0.33.6 |
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
sakalz# aptitude search "~ifirmware-linux" | |
i firmware-linux - Binary firmware for various drivers in the Linux kernel (meta-package) | |
i A firmware-linux-free - Binary firmware for various drivers in the Linux kernel | |
i firmware-linux-nonfree - Binary firmware for various drivers in the Linux kernel (meta-package) | |
sakalz# | |
sakalz# aptitude search "~ilibgl1-mesa" | |
i A libgl1-mesa-dev - free implementation of the OpenGL API -- GLX development files | |
i A libgl1-mesa-dri - free implementation of the OpenGL API -- DRI modules | |
i A libgl1-mesa-dri:i386 |
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
def isgameover(self): | |
player1 = self.game.player1 | |
player2 = self.game.player2 | |
if (player1 and player2) is None: | |
raise Exception("Not initialized players") | |
for barisan in self.enumseq(): | |
if self.iscontainfive(barisan, player1): | |
return True | |
if self.iscontainfive(barisan, player2): |
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
>>> foo = dict([v, k] for k, v in enumerate(["HELO", "INSERT", "REMOVE", "QUIT"])) | |
>>> foo | |
{'INSERT': 1, 'HELO': 0, 'REMOVE': 2, 'QUIT': 3} |
NewerOlder