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
#dates | |
chalange3 = /^(1\d{3}|20(0\d|1[02]))\/(0[1-9]|1[0-2])\/(0[1-9]|[1-2]\d|30)\s([0-1]\d|2[0-3]):[0-5]\d(:[0-5]\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
# bash color prompt | |
bash_prompt_command() { | |
# How many characters of the $PWD should be kept | |
local pwdmaxlen=25 | |
# Indicate that there has been dir truncation | |
local trunc_symbol=".." | |
local dir=${PWD##*/} | |
pwdmaxlen=$(( ( pwdmaxlen < ${#dir} ) ? ${#dir} : pwdmaxlen )) | |
NEW_PWD=${PWD/#$HOME/\~} | |
local pwdoffset=$(( ${#NEW_PWD} - pwdmaxlen )) |
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
from getpass import getpass | |
try: | |
import keyring | |
def get_passwd(address, username): | |
passwd = keyring.get_password(address, username) | |
if passwd is None: | |
passwd = getpass('Password for %s: ' % address) | |
keyring.set_password(address, username, passwd) | |
return passwd |
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 python | |
# -*- coding: utf-8 -* | |
""" | |
Embed IPython kernel and automatically open console | |
connected to it. | |
""" | |
import os | |
from zmq.eventloop.ioloop import IOLoop | |
import IPython |
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
''' | |
Syncthing integration for Caja (MATE file manager) | |
1) Put it into ~/.local/share/caja-python/extensions | |
2) Install python-caja: | |
# sudo apt-get install python-caja | |
3) Install python-requests: | |
$ sudo add-apt-repository ppa:deluge-team/ppa |
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
/* | |
* robotMaze.js | |
* | |
* The blue key is inside a labyrinth, and extracting | |
* it will not be easy. | |
* | |
* It's a good thing that you're a AI expert, or | |
* we would have to leave empty-handed. | |
*/ |
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
/*************** | |
* pointers.js * | |
*************** | |
* | |
* You! How are you still alive? | |
* | |
* Well, no matter. Good luck getting through this | |
* maze of rooms - you'll never see me or the Algorithm again! | |
*/ |
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
set DEP_OPENSSL_INCLUDE=C:\OpenSSL-Win64\include | |
set OPENSSL_INCLUDE_DIR=C:\OpenSSL-Win64\include | |
set OPENSSL_LIBS=ssleay32MT:libeay32MT | |
set OPENSSL_LIB_DIR=C:\OpenSSL-Win64\lib\VC | |
path C:\OpenSSL-Win64\bin;%PATH% | |
cargo test |
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
--- sqlite_master.sql 2016-08-28 10:01:23.227790106 +0300 | |
+++ sqlite_named_enums.sql 2016-08-28 09:26:14.223932432 +0300 | |
@@ -60,7 +60,7 @@ | |
build_id INTEGER NOT NULL, | |
url VARCHAR(2048), | |
PRIMARY KEY (id), | |
- CHECK (status IN ('bad', 'receiving', 'reviewing', 'processing', 'good')), | |
+ CONSTRAINT release_states CHECK (status IN ('bad', 'receiving', 'reviewing', 'processing', 'good')), | |
FOREIGN KEY(build_id) REFERENCES build (id) | |
); |
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
license: mit |
OlderNewer