Skip to content

Instantly share code, notes, and snippets.

@kfatehi
kfatehi / 1pass_dups.js
Last active December 25, 2023 00:35 — forked from thehesiod/1pass_dups.py
1password duplicate remover (alpha, only run in debugger with breakpoints everywhere *g*)
// you need `op` tool for this, download it here https://support.1password.com/command-line/
// create items.json like so:
// op list items | jq > items.json
// then run this script
// this script outputs uuids of dupes as keyed by item title, create, and modified date,
// feed it into the delete command like so:
// node process.js | xargs -I{} op delete item {}
const items = require('./items.json');
@kfatehi
kfatehi / tmux_build_from_source_CentOS.sh
Created March 14, 2018 23:51 — forked from P7h/tmux__CentOS__build_from_source.sh
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.6
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
const fs = require('fs');
const {
Puppet
} = require("matrix-puppet-bridge");
const puppet = new Puppet('/Users/ajohnson/matrixwork/rls/matrix-appservice-imessage/config.json');
puppet.startClient().then(()=>{
const client = puppet.getClient();
var obj = JSON.parse(fs.readFileSync(process.argv[2]))
@kfatehi
kfatehi / hb_all_books_dl.js
Last active March 7, 2021 08:07 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
this fork downloads all formats and does so without using jquery (since that didnt work for me)
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this
type “about:plugins” in the address bar and disable chrome's pdf viewer
*/
var pattern = /(MOBI|EPUB|PDF)$/i;
@kfatehi
kfatehi / ctags.setup
Created December 25, 2015 02:31 — forked from nazgob/ctags.setup
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"

Get the System

You need Linux to build it

git clone https://github.com/nerves-project/nerves-sdk.git
make nerves_bbb_defconfig 
make system               

Copy system.tar.gz to the Mac

Having trouble installing the latest stable version of tmux?

Save yourself some time and run this little fellow!

Prerequisities

  • gcc
  • wget
input {
lumberjack {
# The port to listen on
port => 32451
# The paths to your ssl cert and key
ssl_certificate => "path/to/ssl.crt"
ssl_key => "path/to/ssl.key"
# Set this to whatever you want.
@kfatehi
kfatehi / README.md
Last active August 29, 2015 14:00 — forked from jgeurts/install-graphite-ubuntu-12.04.sh
Graphite 0.9.12 Installer for Ubuntu 12.04

Graphite + Carbon

An all-in-one image running graphite and carbon-cache. Version: 0.9.12.

This script contains a sensible default configuration of graphite and carbon-cache. Starting this container will, by default, bind the the following host ports:

  • 80: the graphite web interface
  • 2003: the carbon-cache line receiver (the standard graphite protocol)
@kfatehi
kfatehi / README.md
Last active December 18, 2015 20:28 — forked from joelverhagen/README.md

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}