Skip to content

Instantly share code, notes, and snippets.

View IgorMuzyka's full-sized avatar

Igor Muzyka IgorMuzyka

View GitHub Profile
@IgorMuzyka
IgorMuzyka / Sleep.ls
Last active December 29, 2015 11:49
A program which lets you sleep))
const minimumSleepTime = 4
maximumSleepHoursByWeekdays = [8, 8, 8, 8, 12, 12, 8]
zIterator = 0
zSymbols = ["Z", "Z", "Z", "z", "z", "z", "z", "z", ".", ".", ".", "\n"]
makeZzzzz = ->
if zIterator == zSymbols.length
zIterator := 0
@IgorMuzyka
IgorMuzyka / upgradeNode.js.sh
Created December 19, 2013 11:51
Simple bash script to update Node.js via NPM
#!/bin/sh
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
node -v
#!/bin/sh
history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn |head -n 10
@IgorMuzyka
IgorMuzyka / client.html
Last active August 29, 2015 13:56
node.js socket.io chat in 44 lines
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js"></script>
</head>
<body>
<input id="messageToSend" type="" />
<input type="button" value="send" onclick="send()" />
<br /><br /><br />
@IgorMuzyka
IgorMuzyka / GLGlitchEffect.h
Last active December 19, 2017 18:17
Objective-C UIImage Glitch
//
// GLGLitchEffect.h
// Glitch
//
// Created by Igor on 27.08.14.
// Copyright (c) 2014 Igor Muzyka. All rights reserved.
//
#import <Foundation/Foundation.h>
@IgorMuzyka
IgorMuzyka / .bash_profile
Last active August 29, 2015 14:06
My .bash_profile on Mac OSX
getVolume() {
osascript -e "output volume of (get volume settings)" | bc
}
alias gv=getVolume
setVolume() {
osascript -e "set volume output volume $1"
}
@IgorMuzyka
IgorMuzyka / MMDirectionPanGestureRecognizer.h
Created October 15, 2014 11:14
Directional gesture recognizer
//
// MMDirectionPanGestureRecognizer.h
// MMSimplifiedTransitions
//
// Created by Igor Muzyka on 8/3/14.
// Copyright (c) 2014 Igor Muzyka. All rights reserved.
//
#import <UIKit/UIKit.h>
//
// AppDelegate.m
// AnimationExamplesiPhone
//
// Created by Eric Allam on 10/05/2014.
#import "AppDelegate.h"
#pragma mark - UIColor Additions
@IgorMuzyka
IgorMuzyka / AppDelegate.h
Created December 17, 2014 19:47
c methods to get class properties classes from properties attributes
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end