Skip to content

Instantly share code, notes, and snippets.

View j0lly's full-sized avatar
🌴
On vacation

josé ferraris j0lly

🌴
On vacation
View GitHub Profile
@j0lly
j0lly / accountid.sh
Created July 20, 2017 16:51
get actual AWS configured profile's account ID, or get an arbitrary one
#!/bin/bash
# ./accountid.sh $USER_ID $USER_KEY
# Or just:
# ./accountid.sh
[[ -n $1 ]] && [[ -n $2 ]] && export AWS_ACCESS_KEY_ID=$1 && export AWS_SECRET_ACCESS_KEY=$2
aws sts get-caller-identity --output text --query Account

Keybase proof

I hereby claim:

  • I am j0lly on github.
  • I am j0lly (https://keybase.io/j0lly) on keybase.
  • I have a public key whose fingerprint is 4B52 F218 18B7 8123 E555 91CF 574C C31A 9C93 0F12

To claim this, I am signing this object:

module.iot-us-bundle-dummy-process.aws_security_group.bundle: Creating...
description: "" => "Bundle default security group"
egress.#: "" => "1"
egress.482069346.cidr_blocks.#: "" => "1"
egress.482069346.cidr_blocks.0: "" => "0.0.0.0/0"
egress.482069346.from_port: "" => "0"
egress.482069346.prefix_list_ids.#: "" => "0"
egress.482069346.protocol: "" => "-1"
egress.482069346.security_groups.#: "" => "0"
egress.482069346.self: "" => "false"
# remap prefix from 'C-b' to 'C-q'
unbind C-b
set-option -g prefix C-q
bind-key C-q send-prefix
# easily toggle synchronization (mnemonic: e is for echo)
bind e setw synchronize-panes on
bind E setw synchronize-panes off
# 0 is too far from ` ;)
@j0lly
j0lly / arvest_proxy.bash
Last active August 29, 2015 14:05
little script to harvest open proxy on 8080 and send an ip list of the scanned /16 network
#!/bin/bash
# ¡ BSD !
#
# J0lly 2014-08-22
# command: ./arvest_proxy.bash 4.50 host@example.com &
# it takes the network part of a /16 network \
# scan the net for open 8080 proxy \
# test it with nc and send ip list via mail to the recipient
@j0lly
j0lly / notifier
Created August 20, 2014 16:43
grab urxvt signals and print notifications and sounds
#!/usr/bin/perl
sub on_osc_seq_perl {
my ( $term, $osc, $resp ) = @_ ;
if ( $osc =~ /^notify;(\S+);(.*)$/ ) {
system ( "notify-send '$1' '$2'" ) ;
system ( "aplay /usr/share/skype/sounds/ChatIncoming.wav" )
}
}
@j0lly
j0lly / osc_notify.py
Created August 20, 2014 16:29
just a paste in orted to keep, remind and indent :P [also added right escapes for tmux instead screen]
# -*- coding: utf-8 -*-
#
#
# [Urxvt, Weechat] Plugin de notification
# http://artisan.karma-lab.net/ajouter-notification-a-urxvt
# Adapted to work in a screen session
# You can add an alias to easily enable disable :
# /alias notify /set var.python.osc_notify.notify_enabled $1
import weechat, string, subprocess, sys
@j0lly
j0lly / .bashrc
Created August 13, 2014 05:08
[dotfile] bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoreboth