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.erlang-solutions.com/downloads/download-erlang-otp | |
# wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
# sudo dpkg -i erlang-solutions_1.0_all.deb | |
deb http://packages.erlang-solutions.com/ubuntu trusty contrib | |
deb http://packages.erlang-solutions.com/ubuntu saucy contrib | |
deb http://packages.erlang-solutions.com/ubuntu precise contrib | |
wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | |
sudo apt-key add erlang_solutions.asc |
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
sudo su | |
apt install -y python-pip | |
git clone https://github.com/google/google-api-python-client | |
cd google-api-python-client | |
python setup.py install install_egg_info | |
pip install gdrivefs | |
cd /sbin | |
ln -s /usr/local/bin/gdfs mount.gdfs | |
echo "/root/.gdfs.creds /mnt/gdrivefs gdfs allow_other,big_writes 0 0" >> /etc/fstab | |
gdfstool auth -u |
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 sleep (seconds) { | |
let start = new Date; | |
while (((new Date) - start) / 1000 < seconds) {} | |
} | |
// console.log('Start', new Date) | |
// sleep(5) | |
// console.log('End', new Date) | |
module.exports = { sleep } |
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 git import Repo, Commit | |
repo = Repo.clone_from('[email protected]:smappi/smappi.git', '/tmp/xxx') | |
# repo = Repo('/tmp/xxx') | |
commits = list(repo.iter_commits('master', max_count=5)) | |
[{'name': str(c.author), 'email': c.author.email, 'msg': c.message} for c in commits] | |
>>> | |
[{'name': 'Mikhail Andreev (adw0rd)', | |
'email': '[email protected]', |
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
In [1]: from git import Repo, Commit | |
In [2]: repo = Repo('/tmp/xxx') | |
In [3]: list(repo.iter_commits('master', 'README.md', max_count=1))[0].author | |
Out[3]: <git.Actor "Mikhail Andreev (adw0rd) <[email protected]>"> |
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
% curl "https://api.github.com/repos/smappi/smappi/commits?path=README.md"|head -n42 | |
{ | |
"sha": "01379e9475822e439749dbfc0ef3d9bcc4939601", | |
"node_id": "MDY6Q29tbWl0MTA4MTM0MDU3OjAxMzc5ZTk0NzU4MjJlNDM5NzQ5ZGJmYzBlZjNkOWJjYzQ5Mzk2MDE=", | |
"commit": { | |
"author": { | |
"name": "Mikhail Andreev", | |
"email": "[email protected]", | |
"date": "2018-07-13T12:10:50Z" |
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
$("#address").suggestions({ | |
token: "5ef98f5781a106962077fb18109095f9f11ebac1", | |
type: "ADDRESS", | |
count: 20, | |
onSuggestionsFetch: function (suggestions) { | |
var items = []; | |
$.each(suggestions, function (i, item) { | |
if (item.value.indexOf('метро') != -1) { | |
items.splice(0, 0, item); | |
} else { |
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
$("#address").suggestions({ | |
token: "5ef98f5781a106962077fb18109095f9f11ebac1", | |
type: "ADDRESS", | |
count: 10, | |
onSuggestionsFetch: function (suggestions) { | |
var instance = $(this).data('suggestions'); | |
var data = { | |
"locations": [{"street_type_full": "метро"}], | |
"restrict_value": false, | |
"query": instance.currentValue, |
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
git grep -l installed|xargs sed -e "s/installed/present/g" -i |
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
[ssh_connection] | |
pipelining=True |