Skip to content

Instantly share code, notes, and snippets.

Hadi Farnoud hadifarnoud

View GitHub Profile
hadifarnoud /
Created Aug 17, 2018 — forked from claus/
Host Your Site Under Your Domain on IPFS

Host Your Site Under Your Domain on IPFS

This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 2GB RAM).

Install IPFS

Log in as root.

First, make sure the system is up to date, and install tar and wget:

# download linux kenel
# intsall linux kenel
sudo dpkg -i *.deb
# unintsall old kenel
dpkg -l|grep linux-image
hadifarnoud /
Created Apr 13, 2018 — forked from glombard/
Merging 4 images into one with Python and PIL/Pillow
# Combine multiple images into one.
# To install the Pillow module on Mac OS X:
# $ xcode-select --install
# $ brew install libtiff libjpeg webp little-cms2
# $ pip install Pillow
from __future__ import print_function
hadifarnoud / hijack-links.js
Created Jun 29, 2017 — forked from philfreo/hijack-links.js
Hijack in-site links for Backbone.js
View hijack-links.js
hadifarnoud / cloudflare.json
Last active Apr 30, 2017 — forked from fouad/cloudflare.json
Purge CloudFlare cache on deploy
View cloudflare.json
"email": "",
View gulpfile.js
//gulp & plugins
var gulp = require('gulp');
var gutil = require('gulp-util');
var jshint = require('gulp-jshint');
var browserify = require('gulp-browserify');
var jade = require('gulp-jade');
var stylus = require('gulp-stylus');
var mocha = require('gulp-mocha');
var nodemon = require('gulp-nodemon');
var livereload = require('gulp-livereload');
hadifarnoud / api.js
Created Sep 26, 2016 — forked from fwielstra/api.js
An example NodeJS / Mongoose / Express application based on their respective tutorials
View api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
View devise_invitable.fa.yml
invited: "شما یک دعوت نامه در حال انتظار دارید، با قبول آن حساب خود را بسازید."
send_instructions: "یک ایمیل دعوت نامه به %{email} ارسال شد."
invitation_token_invalid: "کد دعوت نامه معتبر نیست!"
updated: "رمز عبور شما ذخیره شد. شما وارد سایت شدید!"
updated_not_active: "رمز عبور شما ذخیره شد."
no_invitations_remaining: "دعوت نامه ای نمانده"

Keybase proof

I hereby claim:

  • I am hadifarnoud on github.
  • I am hadifarnoud ( on keybase.
  • I have a public key whose fingerprint is 348A A16A 2BD7 1E3F AA6E B739 9903 D205 63E9 E34B

To claim this, I am signing this object:

hadifarnoud / gist:db45c8656e479444e39f
Last active Aug 29, 2015 — forked from jrochkind/gist:2161449
A Capistrano Rails Guide
View gist:db45c8656e479444e39f

A Capistrano Rails Guide

by Jonathan Rochkind,

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

You can’t perform that action at this time.