Skip to content

Instantly share code, notes, and snippets.

Dmitry Zamaruev DmZ

  • Ukraine, Kharkiv
Block or report user

Report or block DmZ

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DmZ
DmZ / makeOSXiso.sh
Created Jan 17, 2020 — forked from wrossmck/makeOSXiso.sh
Convert Downloaded El Capitan.app to bootable iso
View makeOSXiso.sh
#!/bin/bash
#taken from http://www.insanelymac.com/forum/topic/308533-how-to-create-a-bootable-el-capitan-iso-fo-vmware/
# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
# Create the ElCapitan Blank ISO Image of 7316mb with a Single Partition - Apple Partition Map
hdiutil create -o /tmp/ElCapitan.cdr -size 7316m -layout SPUD -fs HFS+J
@DmZ
DmZ / app1.yml
Last active Aug 29, 2015
Version dependency example (platform v35)
View app1.yml
application:
configuration:
input.app1-initial: "1"
interfaces:
input:
app1-initial: bind(app1-init#input.app1-initial)
vms:
ips: bind(internal-mux#vms.ips)
init:
get-version: bind(app1-init#actions.get-version)
@DmZ
DmZ / hier.yaml
Created Nov 21, 2014
Pool resources example
View hier.yaml
application:
bindings:
- [vms, component1]
- [vms, component2]
- [component1, component2]
components:
vms:
type: workflow.Instance
interfaces:
result:
View 10gen.repo
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
@DmZ
DmZ / pre-commit
Last active Jul 15, 2019
Git pre-commit hook to search for Amazon AWS API keys.
View pre-commit
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@DmZ
DmZ / override_attrs.rb
Last active Dec 15, 2015
Allow override normal attributes passed by command line to chef-solo. Put to libraries/ folder of your cookbook.
View override_attrs.rb
#
# Load attributes from local file
# overriding/merging with command line attributes
#
require 'chef/run_context'
class Chef::RunContext
alias_method :original_load_attributes, :load_attributes
View python.py
#!/usr/bin/env python
# Copyright Jon Berg , turtlemeat.com
# Modified by nikomu @ code.google.com
# Updated for Python 2.4 (dmitry.zamaruev@gmail.com)
# Usage example:
# start server in required directory: python serve.py
# upload file to server: curl -F "upfile=@some.file.pdf" http://127.0.0.1:8080/
@DmZ
DmZ / s3sign.rb
Created Nov 13, 2012
Simple S3 signing for expiring URLs (Ruby)
View s3sign.rb
#!/usr/bin/env ruby
require 'time'
require 'uri'
require 'cgi'
require 'base64'
require 'openssl'
expires = Time.now().to_i + Integer(ARGV[0])
url = URI.parse(ARGV[1])
access_key = ENV["AWS_ACCESS_KEY_ID"]
@DmZ
DmZ / s3sign.py
Created Nov 13, 2012
Simple S3 signing for expiring URLs
View s3sign.py
#!/usr/bin/env python
import os
import sys
import hmac
import time
import urllib
import base64
import hashlib
import urlparse
You can’t perform that action at this time.