Skip to content

Instantly share code, notes, and snippets.

View prysmakou's full-sized avatar

Aliaksandr Prysmakou prysmakou

View GitHub Profile
@prysmakou
prysmakou / dockerhub-v2-api-organization.sh
Created May 18, 2021 05:33 — forked from kizbitz/dockerhub-v2-api-organization.sh
Get the list of images and tags for a Docker Hub organization account
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
ORG=""
@prysmakou
prysmakou / TerminalVim.scpt
Created April 23, 2020 08:18 — forked from charlietran/TerminalVim.scpt
Open file in iTerm vim for MacOS Sierra
-- TerminalVim.app
-- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm
-- To use this script:
-- 1. Open Automator and create a new Application
-- 2. Add the "Run Applescript" action
-- 3. Paste this script into the Run Applescript section
-- 4. Save the application as TerminalVim.app in your Applications folder
-- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default
@prysmakou
prysmakou / PRISM.psm1
Created January 11, 2017 08:54
Convert Dup Files to hardlinks
function Add-Hash ($file)
{
$hasher = [System.Security.Cryptography.SHA1]::Create()
$inputStream = New-Object IO.StreamReader $file.FullName
$hashBytes = $hasher.ComputeHash($inputStream.BaseStream)
$inputStream.Close()
$builder = New-Object System.Text.StringBuilder
$hashBytes | Foreach-Object {
[void] $builder.Append( $PSItem.ToString("X2") )
}
@prysmakou
prysmakou / test.js
Created December 2, 2016 14:31
Test dns resolver
const dns = require('dns');
let i = 1;
let errors = 0;
let l = setInterval(()=>{
const ip = `${Math.floor((Math.random() * 254) + 1)}.${Math.floor((Math.random() * 254) + 1)}.${Math.floor((Math.random() * 254) + 1)}.${Math.floor((Math.random() * 254) + 1)}`;
dns.resolve4(`${ip}.nip.io`, (err, result) => {
if (err) {
errors += 1;
process.stdout.write('!');
} else {

Keybase proof

I hereby claim:

  • I am prysmakou on github.
  • I am prysmakou (https://keybase.io/prysmakou) on keybase.
  • I have a public key whose fingerprint is 9BBB FC24 B579 3202 DE7E F346 1E46 D288 1AAD 9C2F

To claim this, I am signing this object:

@prysmakou
prysmakou / ipsec.conf
Last active April 29, 2016 12:56
ipsec tunnel example
# /etc/ipsec.conf - strongSwan IPsec configuration file
conn customer
# Key info
ikelifetime=480m
keylife=480m
rekeymargin=3m
keyingtries=1
keyexchange=ike
authby=secret
ike=aes256-sha1-modp1024!
@prysmakou
prysmakou / release_copy.rb
Created April 19, 2016 09:20 — forked from voelzmo/release_copy.rb
bosh release copy script
#!/usr/bin/env ruby
require "cli"
require "cli/release"
require "cli/blob_manager"
require "blobstore_client"
require "cli/versions/versions_index"
require 'optparse'
@prysmakou
prysmakou / bosh-cheatsheet.md
Created April 14, 2016 08:59 — forked from allomov-altoros/bosh-cheatsheet.md
BOSH CLI cheatsheet

BOSH command line interface cheatsheet

Intraduction

BOSH is a powerfull tool to install and manage. You can find docks on https://bosh.io/docs. Consider using bosh-init tool to install to a cloud of your choise MicroBOSH instance (MicroBOSH is a single VM BOSH installation, it has everything that you need to deploy and manage).

Installing

BOSH command line interface is implemented as ruby gem, you'll need to have ruby 2.1.x to run it. To install you can run gem install bosh_cli and gem update bosh_cli to update to a newer version. To install BOSH director to your cloud use tool that is called bosh-init, see details here [https://bosh.io/docs/install-bosh-init.html].

@prysmakou
prysmakou / micro.yml
Created October 1, 2015 18:35
Example microbosh manifest for openstack
---
name: bosh
releases:
- name: bosh
url: https://bosh.io/d/github.com/cloudfoundry/bosh?v=208
sha1: 0c84b104d9252295597a9fbcabdf432b6f1bd226
- name: bosh-openstack-cpi
url: https://bosh.io/d/github.com/cloudfoundry-incubator/bosh-openstack-cpi-release?v=12
sha1: 136cc54f03b9f86f3e5ecb124063d671215d29e3
@prysmakou
prysmakou / prysmakou@gmail.com
Last active August 29, 2015 14:20
Prysmakou's public keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnOHpAfVMbj0TzmZXe6K1e19RNJT6OWZ1HbtHVxiGD/IvvuxNWkAyuNAlm1fo5qr6Fa5TsM2VGkTK1Gatbrv9Z87Id+JPeJL2qXU/PxnNwySQRF+XXTGcAKmJk2Ym0sc0vBEdNlW7z5wOhzTc7ZuI9A4ubxbpKfCED5GvBtT6vOTmO3VQypm486ek1UxL6A0/a5PfoGeaGhMDTC9ikJ1Uf7tONt/cruSCosRVyrjIT8IIW4kb6wnwaCKwWBo+ToFAmSoPekqEHudyTsnvye5WFd1FlUkB9JNhQZ29rHJLmQwrfVEThiVN0X3oNv7ZTmIWqGVkHwQV84JWpAj9arhw3 prysmakou@gmail.com