Skip to content

Instantly share code, notes, and snippets.

Guillaume Coré fridim

Block or report user

Report or block fridim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View delete_vpc.sh
#!/bin/sh
#
# Delete a VPC and its dependencies
REGION=eu-central-1
export AWS_PROFILE=sandbox45
if [ -z "$1" ]; then
echo "usage: $0 <vpcid>"
exit 64
@fridim
fridim / mount_qube_volume.sh
Created Jun 3, 2019
Mount a volume inside a qube to /mnt/removable
View mount_qube_volume.sh
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]; then
echo "${0} QUBE VOLUME"
exit 2
fi
set -xeu -o pipefail
volume=$(qvm-block | awk "/${2}/{print \$1}")
UUID=$(sudo blkid /dev/mapper/${2} -sUUID -ovalue)
View output.txt
PLAY [localhost] ******************************************************************************************************************************************************************************
TASK [set_fact] *******************************************************************************************************************************************************************************
ok: [localhost]
TASK [include_role : /tmp/testrole] ***********************************************************************************************************************************************************
TASK [/tmp/testrole : set_fact] ********************************
@fridim
fridim / mysshpassword.sh
Created Apr 20, 2018
write password even if it's a bad idea
View mysshpassword.sh
#!/usr/bin/expect
spawn ssh $argv
expect "password"
send "mypassword\n\r"
expect "$ "
interact
@fridim
fridim / i3-dmenu-desktop.patch
Last active Jun 18, 2017
add caching to i3-dmenu-desktop
View i3-dmenu-desktop.patch
--- /usr/bin/i3-dmenu-desktop 2016-11-12 13:32:44.000000000 +0100
+++ i3-dmenu-desktop 2017-06-18 02:31:25.736657222 +0200
@@ -7,7 +7,8 @@
use strict;
use warnings qw(FATAL utf8);
-use Data::Dumper;
+use Storable;
+#use Data::Dumper;
use IPC::Open2;
View block1_block2.diff
--- /tmp/2 2017-04-11 18:10:47.675418352 +0200
+++ /tmp/3 2017-04-11 18:10:58.305348455 +0200
@@ -4,7 +4,6 @@
- ^{{\s*(\w*)\s*}}$
- 32
_available_variables:
- _raw_params: ./block1.yml
ansible_accelerate_port: 5099
ansible_check_mode: false
ansible_connection: local
@fridim
fridim / block1.yml
Last active Apr 11, 2017
not working
View block1.yml
---
- block:
- name: first block
debug:
msg: "first block, first task"
listen: "first block"
when:
- test1
View blocks_in_handlers.yml
---
- name: conditionnal on blocks in handlers, false false
hosts: localhost
gather_facts: no
vars:
test1: false
test2: false
handlers:
- block:
- name: first block
View qr.sh
#!/usr/bin/bash
qrencode "$(xsel -p)" -o /tmp/qr.png
nohup feh /tmp/qr.png && rm /tmp/qr.png &
@fridim
fridim / get.html
Last active Dec 8, 2016
glod-web a webservice frontend to https://github.com/dwarvesf/glod
View get.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>download goodies!</title>
</head>
<body>
<h1>Extraction in progress ... <span id="ajaxcontent" ></span></h1>
You can’t perform that action at this time.