Skip to content

Instantly share code, notes, and snippets.

View gogson's full-sized avatar
🇫🇷
Locked in a container.

Hugo Lafitte gogson

🇫🇷
Locked in a container.
View GitHub Profile
@gogson
gogson / settings.jsonc
Created May 15, 2023 13:01 — forked from hyperupcall/settings.jsonc
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@gogson
gogson / Dockerfile
Created January 25, 2019 14:18
Test ansible playbook inside a debian 9 container
FROM williamyeh/ansible:debian9
WORKDIR /tmp
COPY . /tmp
RUN echo localhost > inventory
RUN ansible-playbook -v -i inventory monitor-node.yml --connection=local
@gogson
gogson / docker-bash-command.md
Last active October 3, 2023 15:17
Open a bash to a running Docker container using a shell command

Purpose

Create a bash command for opening a shell to a running Docker container

Usage

Fetch container ID from docker ps and run docker-bash 880e6a9d9601 where "880e6a9d9601" is the container ID

Install

@gogson
gogson / gist:40683f441f199018dbbe40547aa6ea1b
Created March 1, 2017 16:43
MongoDB Simple 3 Shard Cluster with 1 Config server rep set
#!/bin/bash
ulimit -n 2048
########################################################################
### CONSTANTS
########################################################################
MONGO_INSTANCE_CONFIG_SERVER_PORT="27017"
MONGO_INSTANCE_QUERY_ROUTER_PORT="27011"
MONGO_INSTANCE_SHARD_1_PORT="27012"
@gogson
gogson / esxi-cli-basic-commands.html
Last active September 14, 2016 09:51
ESXi 5.5 useful CLI commands
/// LIST ALL REGISTERED VMs
/// Will returns the ID of each VM. In my case the id will be "1".
vim-cmd vmsvc/getallvms
/// POWER ON A SINGLE VM FROM IT'S ID
vim-cmd vmsvc/power.on 1
/// POWER OFF A SINGLE VM FROM IT'S ID
vim-cmd vmsvc/power.on 1
@gogson
gogson / angular_debug_watchers.js
Last active August 26, 2016 14:01 — forked from bertrandg/angular_debug_watchers.js
Displays the list all scopes along with the watchers numbers and the TOP 50 of scopes sorted by the watchers number
var debugWatchers = function(selector, dump) {
var target, i, checkInsideFn, jq, items,
nb_watchers = 0,
nb_scopes = 0,
scopes_id = {},
scopeArray = [];
if(typeof jQuery == 'undefined') {
jq = document.createElement('script');
jq.type = 'text/javascript';
@gogson
gogson / packer-esxi-static-network.json
Last active December 7, 2020 22:02
Packer ESXi remote build with static network configuration
{
"vm_name": "my-vm",
"remote_type": "esx5",
"remote_host": "exsi.myhost.com",
"remote_password": "myEsxiRootPassword",
"remote_datastore": "datastore1",
"type": "vmware-iso",
"output_directory": "output-vm",
"floppy_files": [
"preseed.cfg",
@gogson
gogson / git-diff-color-scheme
Created January 7, 2016 13:37
git diff color scheme for Sublime Text 2's git plugin
<dict>
<key>name</key>
<string>Diff insertion</string>
<key>scope</key>
<string>markup.inserted.diff, meta.diff.header.to-file</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#aad2ac</string>
<key>background</key>