Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Shatnyy andrewshatnyy

  • Nuwax Records
  • Melbourne
View GitHub Profile
@andrewshatnyy
andrewshatnyy / pmap.ex
Last active May 11, 2018
Pmap in Elixir the old way
View pmap.ex
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
@andrewshatnyy
andrewshatnyy / gen_fsm.exs
Created Apr 5, 2016
Gen FSM in elixir example
View gen_fsm.exs
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 / remover.js
Created Apr 14, 2015
Delete All Conversations from Facebook messenger
View remover.js
// Make sure you're in Google Chrome:
// 1. Logged in to Facebook
// 2. On https://www.facebook.com/messages
// 3. Open Console and paste following / or create a snippet, save and run it
+function() {
'use strict';
var findNodeWithText = function(text, type){
var children = document.querySelectorAll(type);
var i = 0, node;
@andrewshatnyy
andrewshatnyy / google-voce-purger.js
Last active Aug 29, 2015
Google Voice messages / history purger (For those who think: "how to remove all my history and messages from google voice")
View google-voce-purger.js
// 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 / oldbranches.sh
Created Aug 5, 2013
Mercurial find old branches merged into default oldbranches.sh username
View oldbranches.sh
#!/bin/bash
USERNAME=$1
get_heads () {
hg heads --template "{branches}:{author}\n"
}
find_user_branches () {
get_heads | grep -i "$USERNAME"
}
@andrewshatnyy
andrewshatnyy / BaseModal.handlebars
Created Jul 31, 2013
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();
View BaseModal.handlebars
<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 / README.markdown
Created Jun 25, 2012
MP3 encoder with image processing
View README.markdown

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 / README.markdown
Created Jun 25, 2012
Used for Windows accounts clean up
View README.markdown

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

You can’t perform that action at this time.