Skip to content

Instantly share code, notes, and snippets.

View caputomarcos's full-sized avatar
👽
ping!

Marcos Caputo caputomarcos

👽
ping!
View GitHub Profile

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@caputomarcos
caputomarcos / dokku_stackscript.sh
Created October 2, 2015 19:37 — forked from turley/dokku_stackscript.sh
Linode StackScript for creating a Dokku server
#!/bin/bash
# <UDF name="hostname" label="The hostname for the new Linode" example="apps">
# <UDF name="fqdn" label="The new Linode's Fully Qualified Domain Name" example="apps.example.com">
# <UDF name="adminuser" label="Username for new admin user (cannot be dokku)">
# <UDF name="adminpass" label="Password for new admin user">
# <UDF name="adminkey" label="SSH public key authorized for admin user (password SSH auth will be disabled)">
# <UDF name="dokkukey" label="SSH public key authorized for dokku user (used when deploying apps)">
# Turn off password authentication and root login for SSH
@caputomarcos
caputomarcos / ps1.py
Created May 30, 2019 03:14 — forked from webstory/ps1.py
Python and Nodejs with subprocess
#-*- coding: utf-8 -*-
import subprocess
if __name__ == '__main__':
ps = subprocess.Popen(['nodejs','ps2.js'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
out = ps.communicate(input='http://www.daum.net'.encode())[0]
print(out.decode('utf-8'))
@caputomarcos
caputomarcos / README.md
Created December 5, 2021 01:04 — forked from doino-gretchenliev/README.md
Node-RED Radius custom authentication and authorization. #node-red #nodered #radius #authentication #javascript

Node-RED Radius custom authentication and authorization

Requirements

Installation

  1. Save user-authentication.js to <node-red>/user-authentication.js.
  2. Add the following line to setting.js:
@caputomarcos
caputomarcos / README.md
Created February 5, 2022 15:35 — forked from cerebrate/README.md
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

NOTE

See https://gist.github.com/cerebrate/d40c89d3fa89594e1b1538b2ce9d2720#gistcomment-3563688 below before doing anything else.

Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Yes, I've done this, and yes, it works. It is, however, entirely unsupported and assembled through reasonable guesswork, so if you try this and it explodes your computer, brain, career, relationships, or anything else, you agree that you take sole responsibility for doing it, that I never claimed it was a good idea, and that you didn't get these instructions from me .

@caputomarcos
caputomarcos / decompile_java.md
Last active February 10, 2022 20:23
Decompile Java class or Jar container under Linux Mint / Ubuntu

Lee Benfield's Java decompiler CFR is straight forward and can even batch decompile jar container. 

  1. Download the most recent version of CFR (crf 0.1.15 at the time of writing)
wget http://www.benf.org/other/cfr/cfr_0_115.jar
  1. Run decompile with output into terminal
java -jar cfr_0_115.jar javaclasstodecompiles.class
@caputomarcos
caputomarcos / start_rssh_tunnel.sh
Created March 17, 2022 20:00 — forked from volkstrader/start_rssh_tunnel.sh
Start reverse ssh tunnel for cron job
#!/bin/bash
SSH_REDIR_PORT=12345
SSH_D="cloud_sshd"
COMMAND="ssh -R $SSH_REDIR_PORT:localhost:22 $SSH_D -N -f"
pgrep -f "ssh -R $SSH_REDIR_PORT:localhost:22" > /dev/null 2>&1 || (eval $COMMAND && echo $COMMAND)
@caputomarcos
caputomarcos / Docker: save_load_compressed_container.bash
Created March 21, 2022 22:08 — forked from lsauer/Docker: save_load_compressed_container.bash
Docker: save/load container using tgz file (tar.gz)
#for an image ("not running container") use save:
docker save <dockernameortag> | gzip > mycontainer.tgz
#for running or paused docker, use export:
docker export <dockernameortag> | gzip > mycontainer.tgz
#load
gunzip -c mycontainer.tgz | docker load
@caputomarcos
caputomarcos / listchars.vim
Created May 4, 2022 14:51 — forked from while0pass/listchars.vim
show/hide hidden characters in Vim
" hide hidden chars
:set nolist
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:▓,nbsp:░
" or
@caputomarcos
caputomarcos / qvm-filemanager.pl
Created March 17, 2023 22:05 — forked from 100111001/qvm-filemanager.pl
Qubes OS: Opens a file manager in the focused VM
#!/usr/bin/env perl
use strict;
use warnings;
sub open_file_manager {
my $vm = shift;
exec {'qvm-run'} ('qvm-run', '--', $vm, 'exec nautilus --new-window --no-desktop </dev/null >/dev/null') or die "qvm-run exec failed\n";
}