Skip to content

Instantly share code, notes, and snippets.

@asaushkin
asaushkin / Vagrantfile-digital-ocean
Last active August 26, 2017 10:35
Vagrant file with the digital ocean and virtualbox providers
# -*- mode: ruby -*-
# vi: set ft=ruby :
# First of all, you must obtain an API access key for the Digital Ocean
# provider here https://www.digitalocean.com/api_access
# Next, before use, you must set a local environment key `DIGITAL_OCEAN_TOKEN`
# to the obtained value in the ~/.bashrc file.
Vagrant.configure("2") do |config|
@asaushkin
asaushkin / Alice.java
Created August 2, 2017 13:22
Source class for the stream generated from the Alice in Wonderland
import java.util.Arrays;
import java.util.stream.Stream;
public class Alice {
// http://www.alice-in-wonderland.net/resources/chapters-script/alices-adventures-in-wonderland/all-in-the-golden-afternoon/
public static final String POEM = "ALL in the golden afternoon\n" +
"Full leisurely we glide;\n" +
"For both our oars, with little skill,\n" +
"By little arms are plied,\n" +
"While little hands make vain pretence\n" +
#!/bin/bash
./pgcodekeeper-cli --apgdiff --diff --license my.license \
--dbOld-format db --dbNew-format db \
--allow-danger-ddl DROP_TABLE,DROP_COLUMN,ALTER_COLUMN,RESTART_WITH \
jdbc:postgresql://localhost:5433/dev2 \
jdbc:postgresql://localhost:5433/dev1 \
${1:-/dev/stdout}
@asaushkin
asaushkin / pom.xml
Created May 25, 2017 09:51
Dropwizard Maven POM file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.asaushkin</groupId>
<artifactId>dw</artifactId>
<version>1.0-SNAPSHOT</version>
https://github.com/DIGImend/digimend-kernel-drivers/issues/26
SOLUTION:
Installing digimend-kernel-drivers-6 from source followings the instructions.
Creating 52-tablet.conf because it didn't exist:
cd /etc/X11
sudo mkdir xorg.conf.d
cd xorg.conf.d
sudo gedit 52-tablet.conf
@asaushkin
asaushkin / generate-project.sh
Last active December 30, 2016 22:07
Create multimodule maven projects in the non interactive mode
#!/bin/sh
# org.apache.maven.archetypes:maven-archetype-quickstart
# org.codehaus.mojo.archetypes:pom-root
generate_archetype() {
mvn archetype:generate -B \
-DarchetypeGroupId=$1 \
-DarchetypeArtifactId=$2 \
-DarchetypeVersion=1.1 \
-DgroupId=me.asaushkin.lambda \
@asaushkin
asaushkin / gist:947de41db212ab7924a195b2a7da89a9
Created October 16, 2016 12:07
How to offline install WiFi b43 driver on the Dell Inspiron 1520
http://askubuntu.com/questions/730799/installing-fimware-b43-installer-offline
You need to install firmware-b43-installer.
If you do not have an alternative internet connection, do it this way.
If you installed bcmwl-kernel-source, then remove it.
sudo apt-get purge bcmwl-kernel-source
Download these files
Если при инсталляции PostgreSQL выходит ошибка:
ERROR: no ecoding defined in /usr/share/hunspell/ru_RU.aff, ignoring
то скорее всего файл /usr/share/hunspell/ru_RU.aff содежит начальный BOM маркер для файла UTF-8.
Убрать можно следующим образом:
sudo vim /usr/share/hunspell/ru_RU.aff
Поднять rabbitmq можно такой командой:
docker run --restart=always -d -e RABBITMQ_NODENAME=rabbit --name rabbitmq -p 127.0.0.1:15672:15672 -p 127.0.0.1:5672:5672 rabbitmq:3-management
После настроить очереди можно через веб-нитерфейс (guest/guest): http://127.0.0.1:15672/
Симулятор rabbitmq: http://tryrabbitmq.com/ - можно проверить свои идеи по конфигурации очередей.
docker run --name mongodb -p 27017:27017 -p 28017:28017 -d mongo --rest --httpinterface