Skip to content

Instantly share code, notes, and snippets.

View j-hernandez's full-sized avatar

James Hernandez j-hernandez

  • Atlanta, GA
View GitHub Profile
@unrealwill
unrealwill / Readme.txt
Last active March 28, 2022 16:40
LaBanquePostale Security
Tried to make a payment on aliexpress this weekend.
Turns out the payment processor (wlp-acs.com), after a first valid SMS code check, is requesting my bank secret password.
Didn't give it, no way I'm giving it so the payment was rejected.
For information the identifier for accounts on this bank is written on every cheque you make.
See screenshot below :
I called the bank this morning, and they assured me this is normal that it is "required by law", they call it "second factor".
@nileshtrivedi
nileshtrivedi / home-server.md
Last active January 10, 2024 06:30
Home Server setup: Raspberry PI on Internet via reverse SSH tunnel

Raspberry Pi on Internet via reverse SSH tunnel

HackerNews discussed this with many alternative solutions: https://news.ycombinator.com/item?id=24893615

I already have my own domain name: mydomain.com. I wanted to be able to run some webapps on my Raspberry Pi 4B running perpetually at home in headless mode (just needs 5W power and wireless internet). I wanted to be able to access these apps from public Internet. Dynamic DNS wasn't an option because my ISP blocks all incoming traffic. ngrok would work but the free plan is too restrictive.

I bought a cheap 2GB RAM, 20GB disk VM + a 25GB volume on Hetzner for about 4 EUR/month. Hetzner gave me a static IP for it. I haven't purchased a floating IP yet.

@santosh-rumsan
santosh-rumsan / passthrough-example.js
Created November 18, 2019 10:46
Using Stream PassThrough to pass same output buffer to multiple destination
const PDFMake = require("pdfmake");
const AWS = require("aws-sdk");
const nodemailer = require("nodemailer");
const { PassThrough } = require("stream");
//aws: update your AWS credentials
const accessKeyId = "{aws_accesskey}";
const secretAccessKey = "{aws_secret}";
const region = "us-east-1";
@bvis
bvis / Jenkinsfile
Last active January 3, 2023 20:45
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@Jarred-Sumner
Jarred-Sumner / comcast.js
Last active September 7, 2022 01:30
Comcast injects this into webpages to show copyright notices
// Comcast Cable Communications, LLC Proprietary. Copyright 2014.
// Intended use is to display browser notifications for critical and time sensitive events.
var _ComcastAlert = (function(){
return {
SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'
, dragObj: {zIndex: 999999}
, browser: null
, comcastCheck: 1
, comcastTimer: null
, xmlhttp: null
@j-hernandez
j-hernandez / .tmux.conf
Created November 9, 2015 01:36 — forked from NickLaMuro/.tmux.conf
My .tmux.conf
# # act like GNU screen
unbind C-b
set -g prefix C-a
# Allow C-A a to send C-A to application
bind C-a send-prefix
# start window index of 1
set -g base-index 1
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.

@vsouza
vsouza / .bashrc
Last active April 9, 2024 05:27
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@sergeyhush
sergeyhush / post-receive
Last active August 30, 2021 11:47
Post-receive git hook to check if file changed
#!/bin/bash
WATCH_FILE="abc.123"
while read oldrev newrev refname; do
if [ "$refname" = "refs/heads/master" ]; then
if git diff-tree --name-only -r -z $oldrev $newrev | grep --quiet $WATCH_FILE ; then
# WATCH_FILE changed...
fi
fi
done