Skip to content

Instantly share code, notes, and snippets.

View arupalan's full-sized avatar
🎯
Focusing

arupalan

🎯
Focusing
View GitHub Profile
@arupalan
arupalan / README.md
Created June 6, 2019 18:20 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@arupalan
arupalan / 01-README.md
Created April 5, 2019 11:05 — forked from chrismytton/01-README.md
Mutt Gmail config with OS X keychain

Mutt/Gmail/OS X Keychain

Create a new keychain item, enter the Keychain Item Name as mutt, the Account Name as your gmail email address and then enter your password, then add the keychain item.

2-step auth

If you're using Google 2-step auth, you'll need to generate an Application-specific password from your Google Account settings and enter that as the password.

@arupalan
arupalan / tmux.conf
Created April 3, 2019 07:43 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@arupalan
arupalan / view_attachment.sh
Created March 30, 2019 18:12 — forked from edison23/view_attachment.sh
mutt - view_atachment.sh for mutt - ubuntu
#!/bin/bash
#
# Author: Eric Gebhart
#
# Purpose: To be called by mutt as indicated by .mailcap to handle mail attachments.
#
# Function: Copy the given file to a temporary directory so mutt
# Won't delete it before it is read by the application.
#
# Along the way, discern the file type or use the type
import React, { Fragment, Component } from 'react';
import Helmet from 'react-helmet';
import ReactMarkdown from 'react-markdown';
import styles from './styles.scss';
const importAll = (r) => r.keys().map(r);
const markdownFiles = importAll(require.context('./posts', false, /\.md$/))
.sort()
.reverse();
@arupalan
arupalan / flightplan-deploy.md
Created May 10, 2017 19:56 — forked from learncodeacademy/flightplan-deploy.md
Deploy Node.js Apps with Flightplan

##Setup your server (this would ideally be done with automated provisioning)

  • add a deploy user with password-less ssh see this gist
  • install forever npm install -g forever

##Install flightplan

  • npm install -g flightplan
  • in your project folder npm install flightplan --save-dev
  • create a flightplan.js file
@arupalan
arupalan / scraper.js
Created May 7, 2017 11:07 — forked from sqrtsanta/scraper.js
Scraper based on Horseman, written in functional way with Ramda/Folktale.Task
/* global $ document */
const Horseman = require('node-horseman');
const cheerio = require('cheerio');
const R = require('ramda');
const phantomjs = require('phantomjs-prebuilt');
const { Task, mapf } = require('../utils/f.js');
// fetch :: string -> Task Error HTML
@arupalan
arupalan / Single-page Application (SPA) Project Structure.md
Created May 6, 2017 19:50 — forked from koistya/Single-page Application (SPA) Project Structure.md
Directory Layout of a Single-page Application built with .NET / F#, AngularJS, TypeScript, LESS...

Single-page Application Project Structure

..with .NET / F# (or Node.js / Express), AngularJS (or Facebook React + RxJS), TypeScript, Gulp.js (or Grunt), NuGet...

Goals

  • Project structure should reflect application's logic (as opposed to regular MVC apps which all look the same)
  • Group assets by feature rather than by type (including views, scripts, documentation, tests etc.)
  • Allow developers to edit client-side and server-side code independently from each other
@arupalan
arupalan / topkeywords.js
Created May 6, 2017 08:22 — forked from elliotbonneville/topkeywords.js
Find top keywords associated with a Google search with this Node.js application.
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;
// Transparent navbar
//
// Reset transparent navbar basics
@navbar-transparent-color: transparent;
@navbar-transparent-bg: transparent;
@navbar-transparent-border: transparent;
// Transparent navbar links
@navbar-transparent-link-color: #fff;
@navbar-transparent-link-hover-color: #fff;