Skip to content

Instantly share code, notes, and snippets.

View aabele's full-sized avatar
🏠

Aivis aabele

🏠
View GitHub Profile
@aabele
aabele / gist:7f86d672779719685acc
Created June 9, 2014 07:58
How to push code to review board.
rbt post -o --guess-summary --guess-description --tracking-branch=origin/master
sudo apt-get install zlib1g-dev
sudo apt-get install g++
sudo apt-get install uuid-dev
export VENV=$VIRTUAL_ENV
mkdir $VENV/packages && cd $VENV/packages
curl -O http://oligarchy.co.uk/xapian/1.2.18/xapian-core-1.2.18.tar.xz
curl -O http://oligarchy.co.uk/xapian/1.2.18/xapian-bindings-1.2.18.tar.xz
@aabele
aabele / gist:a7ff7a5337dbcb8788faf2e64db60f21
Created June 30, 2016 09:42
Elasticsearch downgrade on CentOS 6
service elasticsearch stop
yum list installed | grep elastic
yum remove elasticsearch.noarch
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.0.noarch.rpm
yum install elasticsearch-1.7.0.noarch.rpm
rm /var/lock/subsys/elasticsearch -Rf
rm -Rf /var/lib/elasticsearch/*
service elasticsearch start
curl -XGET '127.0.0.1:9200'
@aabele
aabele / items.py
Created January 11, 2017 22:58 — forked from monkeini/items.py
Simple scraping task using Scrapy and PyQuery

Simple Spider Task

Pre-requisites

  • python 2.7 (or 2.6 may suffice)
  • scrapy 0.16.3 +dependencies
  • pyquery

Aims

1. Production
2018-10-11 07:21:56,544 DEBUG Upgraded connection daphne.response.GkzuNjvJfr!CdnKwdIibr to WebSocket daphne.response.GkzuNjvJfr!QfSjmSanWT
2018-10-11 07:21:56,750 DEBUG WebSocket daphne.response.GkzuNjvJfr!QfSjmSanWT open and established
2018-10-11 07:21:56,752 DEBUG WebSocket daphne.response.GkzuNjvJfr!QfSjmSanWT accepted by application
2018-10-11 07:21:56,752 DEBUG Sent WebSocket packet to client for daphne.response.GkzuNjvJfr!QfSjmSanWT
2018-10-11 07:21:56,753 DEBUG Sent WebSocket packet to client for daphne.response.GkzuNjvJfr!QfSjmSanWT
2018-10-11 07:24:38,789 DEBUG WebSocket closed for daphne.response.GkzuNjvJfr!QfSjmSanWT
2. Sandbox
@aabele
aabele / gourcevideo.sh
Created October 27, 2020 18:33 — forked from Gnzlt/gourcevideo.sh
Gource video export command
#!/bin/bash
gource \
-s .03 \
-1280x720 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
@aabele
aabele / gourcevideo.sh
Created October 27, 2020 18:33 — forked from Gnzlt/gourcevideo.sh
Gource video export command
#!/bin/bash
gource \
-s .03 \
-1280x720 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
@aabele
aabele / install.sh
Last active May 24, 2024 08:01
Instalēt Latvijas digitālo parakstu uz Ubuntu linux 20.10
sudo wget -qO - https://www.eparaksts.lv/files/ep3updates/debian/public.key | sudo apt-key add -
sudo apt-add-repository "deb https://www.eparaksts.lv/files/ep3updates/debian focal eparaksts"
sudo apt-get install eparakstitajs3
sudo apt-get install awp
sudo apt-get install latvia-eid-middleware
sudo apt-get install eparaksts-token-signing
@aabele
aabele / color.py
Created October 18, 2023 12:40
When you have input color and output color and you want to calculate the right `amount` value.
import subprocess
desired_output = '*{color:#2290f0}'
# Iterate through possible values of 'amount'
for amount in range(1, 100): # Adjust the range as needed
# Create the Sass code with the current 'amount'
sass_code = f'*{{color:darken(#3a9cf2, {amount})}}'
# Run the Sass command and capture the output