Skip to content

Instantly share code, notes, and snippets.


Reza Akhavan jedireza

View GitHub Profile


name = "app"
version = "0.1.0"
authors = ["reza"]

View find-duplicate-case-sensitive-files.js
'use strict';
let fs = require('fs');
let directory = process.argv[2];
let map = {};
let duplicates = {};
fs.readdir(directory, (err, items) => {
for (let i = 0; i < items.length; i++) {
let key = items[i].toLowerCase();
View nodejs-secure-web-server-with-websockets.js
'use strict';
const Fs = require('fs');
const Https = require('https');
const WebSocketServer = require('ws').Server;
const httpsServer = Https.createServer({
key: Fs.readFileSync(process.env.KEY),
cert: Fs.readFileSync(process.env.CERT)
const wss = new WebSocketServer({
View rustpi2_err.log
This file has been truncated, but you can view the full file.
error: linking with `cc` failed: exit code: 1

Let’s Encrypt + Heroku

Step 1: Setup certificate

$ sudo letsencrypt certonly --manual -d <domain>

You'll need to deploy a verification file to your current website.


My Raspberry Pi Lite Setup

I'm using a RPi2 Model B and my primary computer is a Linux machine. I bought this kit from Amazon.

I like to start with a minimal base and build up as needed. I also like to work from my laptop, accessing the RPi remotely. This means I can work with the RPi without a dedicated keyboard, monitor and mouse. This is known as headless setup. Later, we can connect to the RPi via SSH for terminal access (or VNC if we had an X-server running).

These are just my reference notes. The official docs cover Windows, Mac and Linux in detail.

Raspbian Lite

jedireza /
Last active Aug 29, 2015
Let's land the native FirefoxOS emoji keyboard
jedireza / account-index.jsx
Last active Nov 5, 2015
on the client side
View account-index.jsx
/* global window */
var React = require('react/addons');
var ReactRouter = require('react-router');
var Routes = require('./Routes.react');
var MeStore = require('../../stores/Me');
var MeActions = require('../../actions/Me');
var RedirectActions = require('../../actions/Redirect');
var HistoryLocation = ReactRouter.HistoryLocation;
You can’t perform that action at this time.