Skip to content

Instantly share code, notes, and snippets.

View .aliases
# Aliases
alias o="open ."
alias pi="ping blogfa.com"
alias gis="git status"
alias gad="git add"
alias gil="git log"
alias s="source"
alias sp="spotify"
alias google-chrome="open -a 'Google Chrome'"
alias y="yarn"
@alireza-ahmadi
alireza-ahmadi / todo.md
Last active Mar 22, 2018 — forked from DeckerCHAN/todo.md
Gist todo list
View todo.md

To Do

  • for an empty checkboxP
  • for a checked checkboxP
View SnappTotalPriceCalculator.js
// # Usage
//
// Save this file and replace username and password on the last line of the file with
// your Snapp username and password then run the following commands:
//
// yarn init && yarn add request
// node SnappTotalPriceCalculator.js
//
const request = require('request');
@alireza-ahmadi
alireza-ahmadi / BrewPackages.txt
Created Nov 11, 2016
List of my installed brew packages - `brew list`
View BrewPackages.txt
ack
autoconf
automake
awscli
axel
cairo
cassandra
ccat
cctools
cloc
View bullet.zsh
# Bullet Theme v0.1.0
#
# @author Alireza Ahmadi <info@alireza.es>
PROMPT=' %{$fg_bold[black]%}●%{$fg_bold[green]%}%p %{$fg_bold[blue]%}%c $(git_prompt_info)% %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_CLEAN="> %{$fg_bold[cyan]%}✛ "
ZSH_THEME_GIT_PROMPT_DIRTY="> %{$fg_bold[red]%}✕ "
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[magenta]%}<"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
View defaults-write.md

My defaults write options

[Decrease dock's auto-hide delay]
defaults write com.apple.dock autohide-delay -float 0 && defaults write com.apple.dock autohide-time-modifier -float 0 && killall Dock
defaults delete com.apple.dock autohide-delay && defaults delete com.apple.dock autohide-time-modifier && killall Dock

[Speed up mission control animations]
defaults write com.apple.dock expose-animation-duration -float 0.12 && killall Dock
defaults delete com.apple.dock expose-animation-duration && killall Dock
View pproxy.plugin.zsh
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Insert `ALL_PROXY=socks5://server:port` before the command by pressing
# ESC and p. Heavily inspired by oh-my-zsh's sudo plugin.
#
# ------------------------------------------------------------------------------
# Authors
# -------
View Loop.java
public class Loop {
public static void main(String[] args)
{
Integer total = 500000000;
Integer chunk = 50000000;
Integer i = 0;
View gulpfile.coffee
gulp = require 'gulp'
sourcestream = require 'vinyl-source-stream'
buffer = require 'vinyl-buffer'
util = require 'gulp-util'
sourcemaps = require 'gulp-sourcemaps'
uglify = require 'gulp-uglify'
browserify = require 'browserify'
livereload = require 'gulp-livereload'
minify = require 'gulp-minify-css'
express = require 'express'
@alireza-ahmadi
alireza-ahmadi / Gruntfile.js
Created Sep 25, 2014
Batch compression of PNG files
View Gruntfile.js
var APIKEY = "OOOOOOOOOOOOOOOOOOOOOOOOOO";
module.exports = function(grunt){
grunt.loadNpmTasks('grunt-tinypng');
grunt.initConfig({
tinypng: {
options: {
apiKey: APIKEY,
showProgress: true,
stopOnImageError: false
},