Skip to content

Instantly share code, notes, and snippets.

View dartov's full-sized avatar

Anton Zadorožnyj dartov

  • Teradata
  • Prague
View GitHub Profile
@dartov
dartov / JdbcBlobExample.scala
Created January 30, 2020 11:10
Teradata JDBC Blob Example
import java.io.{File, FileInputStream, FileOutputStream}
import java.sql.{Connection, DriverManager}
object JdbcBlobExample {
def main(args: Array[String]) {
val driver = "com.teradata.jdbc.TeraDriver"
val url = "jdbc:teradata://mytdhost/TMODE=ANSI,CHARSET=UTF8"
val username = "myusername"
val password = "mypassword"
@dartov
dartov / config.yml
Created August 31, 2019 12:41
CircleCI config example for multi-module maven project
version: 2
jobs:
build:
working_directory: ~/my-multi-module-mvn-prj
docker:
- image: circleci/openjdk:8-jdk-stretch
steps:
- checkout
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'pearofducks/ansible-vim'
@dartov
dartov / Set custom status on Slack.applescript
Created May 18, 2017 21:25
Sets custom status on Slack
use framework "Foundation"
use scripting additions
set statusText to "working remotely"
set statusEmoji to ":house_with_garden:"
-- legacy token is available at https://api.slack.com/custom-integrations/legacy-tokens
set token to "super-secret-token"
--
@dartov
dartov / dark_mode.applescript
Last active August 14, 2017 11:34
Scripts to switch dark mode / light mode for my main apps
-- turn on Dark Mode on macOS
tell application "System Events"
tell appearance preferences
set dark mode to true
end tell
end tell
-- turn on Dark Palette on OmniFocus
tell application "OmniFocus"
set value of preference id "OFIColorPaletteIdentifier" to "builtin:OmniFocus Dark"
end tell
@dartov
dartov / README.md
Created September 12, 2015 11:09
Рекомендации по информационной безопасности

Рекомендации по информационной безопасности (Linux, OS X и мобильные устройства)

Ноутбук

  • Использовать MDM (Mobile Device Management, комплекс управления носимыми устройствами), если таковой предоставляет компания.
  • Выключить беспарольный вход, включить требования пароля после засыпания/выключения экрана.
  • Выбрать хороший пароль для основной учетной записи в операционной системе, менять раз в три месяца.
  • Блокировать компьютер при оставлении его даже на короткое время.
  • Включить шифрование диска, для передачи корпоративной информации использовать флэшки с зашифрованными партициями.
  • Включить firewall.
  • Выключить гостевого пользователя и удалить всех ненужных пользователей.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property>
<name>jobTracker</name>
<value>master.saekiyoshiyasu.org:8021</value>
</property>
<property>
<name>nameNode</name>
<value>hdfs://master.saekiyoshiyasu.org:8020</value>
</property>
@dartov
dartov / create_user.yml
Created April 21, 2015 07:21
Adding power user with ansible
#
# Simple playbook to create passwordless sudo user with pubkey authentication for future ansible use
# This assumes you know some other user login/pass
#
# Three simple steps:
# 1. Create some public key: ssh-keygen -t rsa -C "me@example.com"
# 2. Add some inventory into inventory file
# 3. Run playbook: ansible-playbook -i inventory create_user.yml -e "createuser=myuser pubkey_file=~/.ssh/my_pubkey.pub" -u someotheruser -k
#
---
@dartov
dartov / git_demo.sh
Created February 14, 2014 12:20
A simple demo how one can alter history on git server
# Creating a local git server
mkdir -p git_show/git_server
cd git_show/git_server
git init --bare
# Initiating the repo with first commit
cd ../