Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
MSG=`sudo apt-get --yes dist-upgrade`
MSG_HEADING='sudo apt-get --yes dist-upgrade'
GmailSend.py -u [email protected] -p bla -t [email protected] -s "server update" -b "$MSG_HEADING \n\n $MSG"
@mrmichalis
mrmichalis / ks-u.cfg
Last active September 28, 2016 17:38
Ubuntu 12.04 LTS kickstart
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled --trust=eth0 --ssh
# Install OS instead of upgrade
install
# Use CDROM installation media
cdrom
# Root password
rootpw --iscrypted $1$dhsnLjk9$4Xx./mgXqMvEssQENwwZz.
@mrmichalis
mrmichalis / blur.sh
Created June 20, 2013 01:33
Apache blur
git clone -b experimental-dev https://git-wip-us.apache.org/repos/asf/incubator-blur.git
@mrmichalis
mrmichalis / .screenrc
Last active December 19, 2015 04:59
~/.screenrc
# ~/.screenrc
# UTF-8 everywhere
defutf8 on
# disable Ctrl-S/Ctrl-Q "flow control"
defflow off
# skip intro
startup_message off
Here's an updated explanation, 3.9 kernel
[root@destiny ~]# cat /proc/meminfo
MemTotal: 16439720 kB
MemFree: 14309796 kB
Buffers: 67732 kB
Cached: 667072 kB
SwapCached: 0 kB
Active: 527128 kB
Inactive: 263504 kB
Active(anon): 112068 kB
@mrmichalis
mrmichalis / get-cmpasswd.sh
Last active January 6, 2019 20:33
Get list of password from Cloudera Manager embedded PostgreSQL DB and cloudera-scm
#!/usr/bin/env bash
#get-cmpasswd.sh
# password for amon, smon, hmon, rman, nav, scm
cat /etc/cloudera-scm-server/db*.properties | sed '/^#/ d'
# password for cloudera-scm
head -1 /var/lib/cloudera-scm-server-db/data/generated_password.txt
# password for hive
psql -U scm -W scm -h localhost -p 7432 -c "select attr,value from configs where attr like 'hive_metastore_database%' order by revision_id DESC limit 5;"
@mrmichalis
mrmichalis / cloudera.hiveodbc.ini
Created October 4, 2013 12:35
CDH ODBC Hive configuration
[Driver]
## - Note that this default DriverManagerEncoding of UTF-32 is for iODBC.
## - unixODBC uses UTF-16 by default.
## - If unixODBC was compiled with -DSQL_WCHART_CONVERT, then UTF-32 is the correct value.
## Execute 'odbc_config --cflags' to determine if you need UTF-32 or UTF-16 on unixODBC
## - SimbaDM can be used with UTF-8 or UTF-16.
## The DriverUnicodeEncoding setting will cause SimbaDM to run in UTF-8 when set to 2 or UTF-16 when set to 1.
DriverManagerEncoding=UTF-32
@mrmichalis
mrmichalis / 0_reuse_code.js
Created January 30, 2014 20:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mrmichalis
mrmichalis / python_resources.md
Created January 30, 2014 20:47 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@mrmichalis
mrmichalis / javascript_resources.md
Created January 30, 2014 20:47 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage