Skip to content

Instantly share code, notes, and snippets.

View andrewshatnyy's full-sized avatar

Andrew Shatnyy andrewshatnyy

  • Nuwax Records
  • Melbourne
View GitHub Profile
@andrewshatnyy
andrewshatnyy / README.markdown
Created June 25, 2012 04:16
Used for Windows accounts clean up

Accounts-cleaner

Power Shell script that I have used for cleaning accounts mess in windows.

##Requirements

  • Exchange PowerShell
  • Outlook with your account liked to it [needed for export]

##Use it if you need

@andrewshatnyy
andrewshatnyy / README.markdown
Created June 25, 2012 04:40
MP3 encoder with image processing

Wave to Mp3 encode

This is folder based encoder script written in bash/zsh that allows you to encode bunch of Wave files to MP3 with ID3 and embedded artwork.

Protocol

  • Script has to be ran inside of the folder named: CATALOGUE####] Artist Name - Album Name

  • The structure inside forlder should look like that: Artist Name - Track name.wav Track itself

@andrewshatnyy
andrewshatnyy / BaseModal.handlebars
Created July 31, 2013 22:42
Basic Bootstrap Modal in backbone that will clean up after itself to avoid memory leaks. View triggered on button click => modalView = new BaseModalView(); modalView.show();
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
@andrewshatnyy
andrewshatnyy / oldbranches.sh
Created August 5, 2013 21:56
Mercurial find old branches merged into default oldbranches.sh username
#!/bin/bash
USERNAME=$1
get_heads () {
hg heads --template "{branches}:{author}\n"
}
find_user_branches () {
get_heads | grep -i "$USERNAME"
}
@andrewshatnyy
andrewshatnyy / google-voce-purger.js
Last active August 29, 2015 14:06
Google Voice messages / history purger (For those who think: "how to remove all my history and messages from google voice")
// this script is to be pasted into google chrome when you on messages page
// !!! ACTHUNG: IT WILL DESTROY ALL OF YOUR MESSAGES !!!
// I think it will remove everything including history
// Be careful. Make sure you don't need all of you N*k messages
// TO REMOVE HISTORY
// 1. go to history page
// 2. check what url is called for load messages and when you delete messages forever
// 3. replace urs accordinly in loadMessages, deleteAllWith
@andrewshatnyy
andrewshatnyy / gen_fsm.exs
Created April 5, 2016 02:55
Gen FSM in elixir example
defmodule SipsMatcher do
require :gen_fsm
def consume_s(fsm) do
:gen_fsm.sync_send_event(fsm, :s)
end
def consume_not_s(fsm) do
:gen_fsm.sync_send_event(fsm, :not_s)
end
@andrewshatnyy
andrewshatnyy / pmap.ex
Last active May 11, 2018 08:43
Pmap in Elixir the old way
defmodule Pmap do
@moduledoc """
Parrallel map calculator
Calculates a result of a &function/1
"""
@doc """
emit a process, which calculates a number
and sends a message