Skip to content

Instantly share code, notes, and snippets.

@alirezamirian
alirezamirian / demo.gif
Last active July 11, 2017 07:49
A simple angular module for animating delete buttons using md-button
demo.gif
@alirezamirian
alirezamirian / four-letter-game-auto-responder.js
Last active January 31, 2017 19:50
Creates an object for automatically responding to your opponent's guesses in 4-harfi game using Airdroid
/**
* Creates an object for automatically responding to your opponent's guesses in 4-harfi game using Airdroid.
* If you don't have an idea about what 4-harfi game is that's absolutely normal! However if you don't know Airdroid,
* you are missing a really useful android app.
*
* @param word your guess
* @param prevGuess previously guessed word, use it if you want to start automation while already started game.
* @returns {{stop: stop, start: start}}
* start: starts auto responding
* stop: stops auto responding
@alirezamirian
alirezamirian / angular-diagnostics.js
Last active October 1, 2016 10:24
A try for adding debugging info when each of the methods of directives controller gets called. It neither work correctly nor is configurable yet to set which directives to diagnose (you should hardcode it!). I'm just pushing it as a draft
angular.module("diagnostics", [])
.run(function($injector, $controller, $log){
var directivesToInspect = [];
directivesToInspect.forEach(function(directiveName){
$injector.get(directiveName + "Directive").forEach(function(directive){
if(angular.isArray(directive.controller)){
var Ctrl = directive.controller[directive.controller.length-1];
directive.controller[directive.controller.length-1] = function(){
var locals = {};
for(var i=0; i<arguments.length; i++){
@alirezamirian
alirezamirian / README.md
Last active January 9, 2017 07:35
persian-recruitee

Persian Recruitee

Make your recruitee subdomain right-to-left and Persian by simply adding a couple of files to Custom CSS/JS section.

Usage

Add the following lines to Custom CSS/JS section:

<link href="https://rawgit.com/alirezamirian/fa346c4ddbc668afcc15c95afa7cf5e2/raw/styles.css" rel="stylesheet" />
<script src="https://rawgit.com/alirezamirian/fa346c4ddbc668afcc15c95afa7cf5e2/raw/scripts.js"></script>

Translation table