Skip to content

Instantly share code, notes, and snippets.


Daniel Hernandez DanNYSPD

  • Mexico
View GitHub Profile
View gist:092f58a8f9ef86ba496db954143d27de





DanNYSPD / download_ref.js
Created Mar 9, 2021
Gets hrefs and download via wget
View download_ref.js
//download pages that are referenced by a "a element", usefull for pages with links to documentations
Array.from(document.querySelectorAll('body > p > a')).map(x=>"wget "+x.href).join(" & ");
DanNYSPD / .tmux.conf
Created Dec 11, 2020 — forked from miguelgrinberg/.tmux.conf
My .tmux.conf file for working with tmux
View .tmux.conf
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
Last active Nov 13, 2020 — forked from larshaendler/
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)
cd /usr/local/bin && wget
  1. Run decompile with output into terminal
java -jar /usr/local/bin/cfr_0_115.jar javaclasstodecompiles.class
DanNYSPD / php5.6-pgsql.Dockerfile
Created Oct 31, 2020 — forked from ben-albon/php5.6-pgsql.Dockerfile
Docker PHP Image with PostgreSQL Driver
View php5.6-pgsql.Dockerfile
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html

Modifying an Existing Docker Image

To install a custom package or modify an existing docker image we need to

  1. run a docker a container from the image we wish to modify
  2. modify the docker container
  3. commit the changes to the container as a docker image
  4. test changes made to image

1.) Running a docker container from an image

DanNYSPD / Dockerfile
Last active Aug 16, 2020 — forked from Tazeg/Dockerfile
Dockerfile for a dev web server with PHP/Apache
View Dockerfile
# To create the docker image :
# cd <this file directory>
# docker build -t apache-php-dev .
# Start image :
# docker run -d -p 80:80 -v /home/user/public_html:/var/www/html apache-php-dev
# Open browser :
# http://localhost