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 SPARQLWrapper import SPARQLWrapper, JSON | |
sparql = SPARQLWrapper("http://104.155.96.199/blazegraph/sparql") | |
sparql.setQuery(""" | |
PREFIX fts: <https://w3id.org/datafabric.cc/ontologies/fts#> |
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
You need to do base backups often... | |
sudo -u postgres envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-push /usr/local/pgsql/data | |
You can check how many objects are not archived: | |
./var/backup_status.sh |
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
# WAL-E (https://github.com/wal-e/wal-e) install | |
sudo su | |
source /var/.cloud66_env | |
sudo apt-get install daemontools | |
sudo apt-get install -y python-virtualenv python-dev git libevent-dev pv lzop vim | |
sudo pip install git+https://github.com/wal-e/wal-e | |
umask u=rwx,g=rx,o= | |
mkdir -p /etc/wal-e.d/env | |
echo $AWS_SECRET_ACCESS_KEY > /etc/wal-e.d/env/AWS_SECRET_ACCESS_KEY |
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
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
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
; call trello2org interactively | |
; or pragmatically like this: (trello2org "c:/Users/jfurtney/blo-up-2-7.json") | |
(require 'json) | |
(defun convert-trello-json-file-to-org (trello-json-file) | |
(let* ((board (json-read-file trello-json-file)) | |
(board-name (cdr (assoc 'name (cdr board)))) | |
(lists (cdr (assoc 'lists (cdr board)))) |
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
# standard capistrano config goes here.... | |
# Prettify output to console | |
logger.level = Capistrano::Logger::IMPORTANT | |
STDOUT.sync | |
before "deploy:web:disable" do print "\e[34m-->\e[0m Put maintenance sreen......."; end | |
after "deploy:web:disable" do puts "[\e[32m✓\e[0m]"; end |
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
module CarrierWave | |
module FFMPEG | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def faststart | |
process :faststart => true | |
end | |
def transcode options |