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 { Observable, Subscriber } from 'rxjs'; | |
function readAs( | |
blob: Blob, | |
as: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text', | |
encoding?: string | |
): Observable<any> { | |
return new Observable( | |
(subscriber: Subscriber<string | ArrayBuffer | null>) => { | |
const fileReader = new FileReader(); |
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
''' | |
Maestral (Dropbox open source client) 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 | |
To see caja output in terminal: | |
$ caja -q && caja | |
''' | |
from os import path |
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
/** | |
* Nice little trick that allows to provide some settings in the parent | |
* and then override some of them in the child | |
*/ | |
import { Component, Inject, InjectionToken, NgModule, SkipSelf } from '@angular/core'; | |
import { defaults } from 'lodash-es'; | |
export const SETTINGS_TOKEN = new InjectionToken('SETTINGS_TOKEN'); | |
@Component({ |
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 |
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
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
/*************** | |
* 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
/* | |
* 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
''' | |
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
#!/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 |
NewerOlder