Skip to content

Instantly share code, notes, and snippets.

@miztiik
miztiik / Notepad++_userDefineLang-for-Dockerfile.xml
Last active September 2, 2021 21:05 — forked from centic9/userDefineLang_Dockerfile.xml
notepad++ syntax highlighting for Dockerfiles
<NotepadPlus>
<UserLang name="Dockerfile" ext="Dockerfile" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03 04 00# 01 02</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@miztiik
miztiik / bash.generate.random.alphanumeric.string.sh
Last active August 29, 2015 14:27 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
function genStringPatterns() {
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@miztiik
miztiik / utserver.conf
Last active August 26, 2015 03:58
Configuration settings template for μTorrent for Linux. Taken from μTorrent Server manual for version alpha-3.3. - Ref - http://forum.utorrent.com/topic/73370-sample-utserverconfig-file/
##
## utserver.conf
## Configuration settings template for μTorrent for Linux.
## Taken from μTorrent Server manual for version alpha-3.3.
## ©2013 BitTorrent, Inc.
## Compiled by Rich.T.
##
##
## Command-line Arguments
<NotepadPlus>
<UserLang name="AFL" ext="afl AFL">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="yes" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">&quot;00&quot;00</Keywords>
<NotepadPlus>
<UserLang name="Markdown" ext="md markdown" udlVersion="2.0">
<!-- Modified by Edditoria, originally created by thomsmits @ git,
see https://github.com/Edditoria/markdown_npp_zenburn for latest version -->
<Settings>
<Global caseIgnored="yes" forceLineCommentsAtBOL="yes" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" />
</Settings>
<KeywordLists>
<Keywords name="Comments" id="0">00# 01 02 03&lt;!-- 04--&gt;</Keywords>
@miztiik
miztiik / Install-Docker&-Compose
Created February 24, 2016 19:10
Quick set of commands to install docker & compose in one go
curl -fsSL https://get.docker.com/ | sh && \
service docker start && \
curl -L https://github.com/docker/compose/releases/download/1.6.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
See in comments
@miztiik
miztiik / chef-workstation-quick-setup.sh
Last active August 30, 2016 05:37
chef-workstation-quick-setup.sh
yum install deltarpm wget unzip python-pip -y
cd /tmp
wget https://github.com/miztiik/Learn-Chef/blob/master/init/init.zip?raw=true -O init.zip
mv init.zip /
cd /
unzip init.zip
cd /chef-repo
# curl -L https://www.opscode.com/chef/install.sh | bash
curl -L https://www.opscode.com/chef/install.sh | bash -s -v 12.13.30 && rm install.sh
service chef-client restart
@miztiik
miztiik / fetchMetadata.py
Created August 23, 2016 06:51
AWS Lamda experiment to fetch media metadata from OMDB using their API
def lambda_handler(event, context):
import requests, json
r = requests.get('http://www.omdbapi.com/?t=titanic&y=1997&plot=short&r=json')
mediaMetadata = r.json()
print json.dumps( mediaMetadata, indent=4, sort_keys=True )
return {json.dumps( mediaMetadata, indent=4, sort_keys=True )}
@miztiik
miztiik / LAMP-Stack-On-Redhat-Centos-Or-RHEL.sh
Last active February 1, 2021 11:11
Install a AMP (Apache, Maria DB, PhP) Wordpress website in Redhat
# [To Install EPEL Package](https://fedoraproject.org/wiki/EPEL)
yum -y install epel-release || cd /tmp; curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && yum -y install release-latest-7.noarch.rpm
# To enable Red Hat's Extras and Optional repos, you would then run the following:
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
# Install PHP, PHPMYADMIN, MARIADB, MYSQL CLIENT & WORDPRESS
yum install -y httpd php php-mysql mariadb-server phpmyadmin \
&& systemctl enable mariadb && service mariadb restart \
&& systemctl enable httpd && systemctl start httpd \