Skip to content

Instantly share code, notes, and snippets.

View ibnishak's full-sized avatar
💭
Narendra Modi govt is persecuting Indian Muslims. Let it be known.

Rizwan ibnishak

💭
Narendra Modi govt is persecuting Indian Muslims. Let it be known.
View GitHub Profile
@ivanperez-keera
ivanperez-keera / Associate org-mode files with emacs.md
Last active August 7, 2021 10:06
Associate Org-mode files with emacs (on Linux)

On linux, files tend to be identified by type, not extension.

org-mode files are text files, but only a few editors support org-mode (emacs, vim, etc.)

This file can be used to associate org-mode files to a specific editor (like emacs), while using other editors for plain text files.

  • Save as /usr/share/mime/packages/org.xml;
  • Run
@kethinov
kethinov / walksync.js
Created September 22, 2013 09:04
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {