Skip to content

Instantly share code, notes, and snippets.

View neidiom's full-sized avatar
On vacation

Nedim Hadzimahmutovic neidiom

On vacation
View GitHub Profile
#!/usr/bin/env ruby
require 'httparty'
require 'json'
reddit_api_url = ""
resp = HTTParty.get(reddit_api_url)
data = JSON.parse(resp.body)
data['data']['children'].each do |sub|
neidiom / site.pp
Created October 16, 2016 11:41 — forked from seanhagen/site.pp
Simple PHP Puppet setup
group { 'puppet':
ensure => present,
class initial_setup {
exec { 'apt-get update':
command => '/usr/bin/apt-get update',
package { "essential-packages":
neidiom / capistrano-3-basic-set-up
Created February 9, 2017 14:09 — forked from albankora/capistrano-3-basic-set-up
Capistrano 3 basic set up
#create a public key base on the link bellow
#the local public key has to be added on and the remote server
#if you added a pass phrase to the key you need to add your public key to the remote server
#set up the public ssh to your account
neidiom /
Last active February 19, 2018 17:08 — forked from agarzon/
Change a domain's ip address from old one to new one via Plesk cli dns util
if [ -z "$1" ]
echo "Please provide a domain name as argument"
exit 1
if [ -z "$2" ]
www_dir = '/var/www'
domain = ''
sajts = ['sajt99','sajt98','sajt97']
sajts.each do |sajt|
directory www_dir do
owner 'www-data'
group 'www-data'
mode '0755'
action :create
neidiom /
Created April 5, 2018 11:07 — forked from jcorioland/
Create an Azure Container Service Kubernetes Cluster with Azure CLI

Create an Azure Container Service Kubernetes Cluster with Azure CLI

Login (interactive) to your Azure subscription using Azure CLI

az login

Create a resource group

neidiom /
Created April 5, 2018 11:27 — forked from jonahgeorge/
Azure Kubernetes
# Install Azure CLI
brew update
brew install azure-cli
# Authenticate cli client
az login
# Register providers
az provider register -n Microsoft.ContainerService
az provider register -n Microsoft.Compute
neidiom / cleanup.rb
Created April 16, 2018 18:58 — forked from gregohardy/cleanup.rb
Azure Account Managment
require 'azure_mgmt_compute'
require 'azure_mgmt_resources'
require 'azure_mgmt_storage'
require 'azure'
include Azure
include Azure::ARM::Compute
include Azure::ARM::Compute::Models
include Azure::ARM::Resources
require 'sinatra'
set :bind, ''
set :port, 8080
post '/event' do
status 204 #successful request with no body content