Skip to content

Instantly share code, notes, and snippets.

View carlochess's full-sized avatar
🎯
Focusing

Carlos Roman carlochess

🎯
Focusing
View GitHub Profile
@mikebroberts
mikebroberts / template.yaml
Last active March 7, 2024 13:45
CloudFront Functions Demo with CloudFormation
Description: CloudFront Functions Demo
# This example shows how to use CloudFront, CloudFront Functions, and CloudFormation.
# In this simple example we setup CloudFront so that on any request we redirect to another site.
# While basic, this example can be expanded to provide typical redirect scenarios, based
# on the event passed to the function.
# This example written by Mike Roberts (https://twitter.com/mikebroberts), Symphonia.
# For more ideas about using AWS more effectively,see our blog at https://blog.symphonia.io/
@prologic
prologic / LearnGoIn5mins.md
Last active November 5, 2024 02:14
Learn Go in ~5mins
@lizthegrey
lizthegrey / attributes.rb
Last active September 24, 2024 14:33
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@cfra
cfra / ethernet-socat-ssh.md
Last active September 29, 2024 11:45
Tunneling Ethernet Over SSH With Socat and Tap Devices

Tunneling Ethernet Over SSH With Socat and Tap Devices

There are circumstances where one wants to attach the local machine to the same layer 2 ethernet segment, which a remote machine is connected to, with the only available transport being SSH.

While this solution has quite some shortcomings and should not be used to replace a real VPN, it can be beneficial e.g. for debugging network issues remotely.

@julianduque
julianduque / dns.md
Last active May 29, 2018 13:24
DNS Command Line Configuration on macOS

DNS Command Line Configuration on macOS

The following commands work on macOS High Sierra, not tested in previous versions

Get DNS Resolvers

$ scutil --dns | grep 'nameserver\[[0-9]*\]'
@oconnor663
oconnor663 / bad_git.sh
Created October 4, 2017 17:02
edit a git commit without changing the hash
#! /bin/bash
d="$(mktemp -d)"
# Make a git repo with one file in it.
mkdir "$d/good"
cd "$d/good"
git init
echo good > file.txt
git add -A
@ruanbekker
ruanbekker / cheatsheet-elasticsearch.md
Last active October 26, 2024 17:40
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@duduribeiro
duduribeiro / Jenkinsfile
Created July 1, 2017 05:10
review_app-Jenkinsfile-final
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'docker build -t openjobs:latest .'
sh 'docker-compose build'
sh 'docker-compose run web bundle install'
sh 'docker-compose run web yarn'
sh 'docker-compose run -e RAILS_ENV=test --rm web bundle exec rake db:drop db:create db:migrate'
'use strict';
// Dependencies
const gcloud = require('google-cloud', {
projectId: 'sara-bigquery',
keyfileName: 'keyfile.json'
});
const vision = gcloud.vision();
const fs = require('fs');
const async = require('async');